EPICS Home

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: Eric Norum <eric@norum.ca>
To: Ralph Lange <Ralph.Lange@gmx.de>
Cc: EPICS Core Talk <core-talk@aps.anl.gov>, Dirk Zimoch <dirk.zimoch@psi.ch>
Date: Fri, 8 Jun 2012 06:45:38 -0700
On Jun 8, 2012, at 6:35 AM, Ralph Lange wrote:

It is application dependent. Short sleeps are usually intended as waits,
so the application assumes it will wake up no earlier than after the
requested time. This is why the OS specific sleep functions always round
up, never down. And this is why I think the epicsTimer should behave the
same way.

In case an application wants a statistically optimized behavior, it can
easily get the quantum and do the subtraction itself.

I know this is symmetric (the application could add half a quantum when
it wants the round-up behavior), but I would strongly suggest that the
semantics of the epicsTimer follow the semantics of all reasonable OS's
sleep implementations, and always round up to the next quantum.


I agree with Ralph 100% 
I've never encountered a 'sleep/pause/nap/delay' function that could return early.
-- 
Eric Norum
eric@norum.ca





Replies:
RE: epicsTimer and rounding Hill, Jeff
RE: epicsTimer and rounding Hill, Jeff
RE: epicsTimer and rounding Hill, Jeff
References:
epicsTimer and rounding Ralph Lange
RE: epicsTimer and rounding Hill, Jeff
Re: epicsTimer and rounding Ralph Lange

Navigate by Date:
Prev: Re: epicsTimer and rounding Kasemir, Kay
Next: RE: epicsTimer and rounding Hill, Jeff
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 Andrew Johnson
Next: RE: epicsTimer and rounding Hill, Jeff
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020