EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: VxWorks time()
From: Ralph Lange <[email protected]>
To: "Thompson, David H." <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Wed, 01 Aug 2007 12:40:57 +0200
Note that there's always been stuff in base to do the time sync:

In 3.14, the code in src/libCom/osi/os/vxWorks/iocClock.c will create a thread that does a regular NTP sync with the server specified by the environment var EPICS_TS_NTP_INET (default: boot server). Watch for a thread named "syncNTP".

In 3.13, drvTS was part of base, so calling "TSconfigure" with no arguments from the startup script (making the IOC a "soft timing slave") would have the IOC do a regular NTP sync with the server specified by the same environment var (default: boot server). Set "TSdriverDebug=10" on the vxWorks shell to see what it's doing.

The main purpose of generalTime is to allow for multiple time sources to be configured, with the IOC switching between the sources on availability to always automatically provide the most accurate time possible.

Cheers,
Ralph


Thompson, David H. wrote:
The time(0) will return the number of seconds that the IOC has been
running unless you set it. Unless the ioc has been up for a year ctime
would convert that into a date in 1970 since time(0) is 1/1/70 00:00
GMT.


Out kernels make a call to sntpTimeGet() and then a call to
clock_settime() before running the startup script.  That gets it right
for a while but it will drift.  You can make these calls from the top of
the startup script so long as you malloc a block of memory to hold a
struct timespec to pass to the two calls.

The generalTime driver may do the same thing.


Replies:
Re: VxWorks time() Andrew Johnson
References:
VxWorks time() Kevin M. Peterson
RE: VxWorks time() Thompson, David H.

Navigate by Date:
Prev: Re: PV save and restore tool sought (correction) Carl Lionberger
Next: edm: bug-reports unnecessary? Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: VxWorks time() Thompson, David H.
Next: Re: VxWorks time() Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·