Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EPICS time and clock_gettime function

We encountered a strange issue, which I am hoping someone can shed some light on.

The EPICS framework uses the clock_gettime function from <time.h> to determine timestamps. However for some reason everytime after a reboot of the machine the return value of this function appears to be the time since reboot.

In comparison the time () function returns the correct time in seconds since the Epoch regardless of weather the machine has been rebooted or not.

We have temporarily solved this problem by calling the clock_settime function with the value returned from the time function, however if we are synchronizing from a NTP server there is the possibility for time drift.

Can someone please explain this behavior ?

Forum Jump:

Users browsing this thread: 1 Guest(s)