Experimental Physics and Industrial Control System
Hi,
While helping us with finding a weird behavior in a StreamDevice based
interface, Dirk Zimoch found the following:
When adapting the expire period (requested as a double value in seconds)
to the matching amount of sleep quantums, the current implementation of
epicsTimer rounds mathematically (line 71 of timer.cpp subtracts half a
quantum from the expire time). So, for requested expire periods in the
same order as the quantum, the actual expire period used by the timer is
up to 100% shorter than the requested period.
In the section about epicsTimer, the App Developers' does not make a
statement about the relation between requested and actual period.
IMHO, the actual expire period should always be equal or larger than the
requested value, i.e. the implementation should always round up when
converting to quantums. (And the doc should mention this behavior.)
What do you think?
Cheers,
~Ralph
- Replies:
- RE: epicsTimer and rounding Hill, Jeff
- Navigate by Date:
- Prev:
[Merge] lp:~mdavidsaver/epics-base/epicsconf into lp:epics-base/3.14 Andrew Johnson
- Next:
RE: epicsTimer and rounding Hill, Jeff
- Index:
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:
[Merge] lp:~mdavidsaver/epics-base/epicsconf into lp:epics-base/3.14 Andrew Johnson
- Next:
RE: epicsTimer and rounding Hill, Jeff
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024