Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: epicsTimer and rounding
From: Ralph Lange <Ralph.Lange@gmx.de>
To: "core-talk@aps.anl.gov" <core-talk@aps.anl.gov>
Date: Fri, 08 Jun 2012 19:07:02 +0200
On 08.06.2012 18:56, Hill, Jeff wrote:
> Actually my understanding is that Ralph is requesting two action items.
>
> 1) Remove the compensation in the epicsTimer class which subtracts one half quantum from the timer's expiration time stamp. This is accepting going to a new behavior where on average timers will expire one half tick too late (the regression tests should verify this) but is presumably needed because we prefer behavior where timers never expire as much as one half tick too early (as is the case now).
>
> 2) Make all epicsThreadSleep implementations follow the application developer's guide and implement epicsThreadSleep(double ss) as follows.
>
> ss <= 0.0                sleep for 0 ticks
> 0 < ss <= 1 tick         sleep for 1 tick (typical actual delay between 1 and 2 ticks)
> 1 tick < ss <= 2 tick    sleep for 2 ticks (typical actual delay between 2 and 3 ticks)
> 2 tick < ss <= 3 tick    sleep for 3 ticks (typical actual delay between 3 and 4 ticks)
>
> Of course what is typical is actually OS specific so changes to OS specific implementations may need some care. Nevertheless, we prefer some consistency when the delay granularity is a tick (maybe not always the case looking briefly at the posix code).

This correctly and fully describes my request. Thanks, Jeff.

I do see the use case for a statistically improved timer, though.
For this I like Kay's idea of allowing the C++ timer class user to
select the behavior through the API.

Cheers,
Ralph


Replies:
Re: epicsTimer and rounding Andrew Johnson
References:
Re: epicsTimer and rounding Kasemir, Kay
Re: epicsTimer and rounding Andrew Johnson
RE: epicsTimer and rounding Hill, Jeff
Re: epicsTimer and rounding Andrew Johnson
RE: epicsTimer and rounding Hill, Jeff

Navigate by Date:
Prev: Re: epicsTimer and rounding Ralph Lange
Next: Re: epicsTimer and rounding Eric Norum
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: RE: epicsTimer and rounding Hill, Jeff
Next: Re: epicsTimer and rounding Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 26 Nov 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·