1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== 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 |
Cheers, Ralph
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.