HP-UX FAQ for clock_gettime(CLOCK_REALTIME)

aix bsd hp-ux linux mac-osx solaris windows

No answers yet. Email juliusdavies@gmail.com if you know some of the answers!


> 1. Is clock_gettime(CLOCK_REALTIME) consistent across all processors/cores?
>    (Does arch matter?  e.g. pa-risc, ia64).

 

 

 

 

> 2. Does clock_gettime(CLOCK_REALTIME) pick up the new time when a user
>    (e.g. root) changes the current time on their computer?

 

 

> 3. Does clock_gettime(CLOCK_REALTIME) pick up NTP changes?
> 4. Does clock_gettime(CLOCK_REALTIME) pick up NTP clock slew?

 

 

> 5. gettimeofday() returns usec.  Aside from that, what are the differences
>    between gettimeofday() and clock_gettime(CLOCK_REALTIME)?  Which would you
>    recommend programmers use?

 

 

 

 

>    Is the 2038/2106 problem a possibility for any of these?

 

> 6. How about setting the current time:  what are the differences between
>    settimeofday() and clock_settime(CLOCK_REALTIME)?

 

> 7. How does clock_gettime(CLOCK_REALTIME) work?  Let's assume the most recent
>    production release of HP-UX on the following systems.

 

>    32bit single core, single socket

 

 

>    64bit single core, single socket

 

 

>    64bit multi-core, multi-socket

 

 

> 8. Are there any interesting points / implementation notes worth knowing about
>    clock_gettime(CLOCK_REALTIME)?  Any notes regarding virtual machines?

 

> 9. Closing Comments.