EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Monotonic time from EPICS Base libCom?
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Thu, 13 Nov 2014 17:57:09 -0500
On 11/13/2014 04:18 PM, J. Lewis Muir wrote:
> Without monotonic time, the closest I can get to this in a simple way
> is to use epicsTimeGetCurrent and epicsTimeDiffInSeconds.  This is
> suboptimal because I have to deal with time that can advance backward
> or forward in an unpredictable way, and it's not possible to correctly
> compensate for that.

Strictly speaking epicsTimeGetCurrent() does try to prevent backwards
jumps.  Subsequent calls should never return later values.  Of course in
some cases this means that time stops...

The root problem I see is that generalTime tries to provide at once the
properties of a real (wall clock) time source, and a monotonic time
source.  It only partially succeeds in this as epicsTimeGetCurrent() has
some properties of a real time clock (absolute reference, global
meaning), and some of a monotonic clock (not jumping backwards).


I think it wouldn't be difficult to add a real monotonic time source
which defaults to epicsTimeGetCurrent() for platforms without such a
time source.  POSIX has clock_gettime w/ CLOCK_MONOTONIC and similar
(RTEMS implements this).  Windows has something as well.  Not sure about
vxWorks.

https://bugs.launchpad.net/epics-base/+bug/1392516


Replies:
Re: Monotonic time from EPICS Base libCom? J. Lewis Muir
References:
Monotonic time from EPICS Base libCom? J. Lewis Muir

Navigate by Date:
Prev: Re: Agilent 3458A Multimeter Andrew Johnson
Next: Re: Browser based EPICS GUI Jani Hakala
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Monotonic time from EPICS Base libCom? J. Lewis Muir
Next: Re: Monotonic time from EPICS Base libCom? J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·