NetBSD seems to do what it says, which is either good, or bad, depending
on how you're bent.
$ ./testTimer
epicsThreadSleepQuantum=0.010000
Elapsed time to sleep for 0.000100 seconds 1000 times=19.995795
Elapsed time to sleep for 0.000200 seconds 1000 times=20.020289
Elapsed time to sleep for 0.000500 seconds 1000 times=20.000253
Elapsed time to sleep for 0.001000 seconds 1000 times=20.000248
Elapsed time to sleep for 0.002000 seconds 1000 times=20.000243
Elapsed time to sleep for 0.005000 seconds 1000 times=20.000370
Elapsed time to sleep for 0.010000 seconds 1000 times=20.000432
Elapsed time to sleep for 0.020000 seconds 1000 times=30.090901
$
Well, at least if it says you can't get below 0.01, it won't let you go
below 0.01, but would be nice if you could get more accuracy, I guess.
David Dudley
>>> Eric Norum <[email protected]> 9/29/2008 3:26 PM >>>
Looks like Darwin has the same issues. Intervals down to 100
microseconds seem to be useable.
norume@gnarly 283> ./testTimer
epicsThreadSleepQuantum=0.010000
Elapsed time to sleep for 0.000100 seconds 1000 times=0.122238
Elapsed time to sleep for 0.000200 seconds 1000 times=0.220128
Elapsed time to sleep for 0.000500 seconds 1000 times=0.520916
Elapsed time to sleep for 0.001000 seconds 1000 times=1.021224
Elapsed time to sleep for 0.002000 seconds 1000 times=2.021927
Elapsed time to sleep for 0.005000 seconds 1000 times=5.024166
Elapsed time to sleep for 0.010000 seconds 1000 times=10.026175
Elapsed time to sleep for 0.020000 seconds 1000 times=20.026937
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:826-1265
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:[email protected]
N:Dudley;David
TITLE:Functional Analyst
END:VCARD
- References:
- epicsThreadSleep() and epicsThreadSleepQuantum() Mark Rivers
- Re: epicsThreadSleep() and epicsThreadSleepQuantum() Eric Norum
- Navigate by Date:
- Prev:
Re: Record Initialization Dirk Zimoch
- Next:
Re: epicsThreadSleep() and epicsThreadSleepQuantum() J. Lewis Muir
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: epicsThreadSleep() and epicsThreadSleepQuantum() J. Lewis Muir
- Next:
RE: epicsThreadSleep() and epicsThreadSleepQuantum() Jeff Hill
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|