Macros | |
| #define | _GNU_SOURCE |
| #define | _REENTRANT |
Functions | |
| int | ngcbTaiOffset () |
| int | ngcbGetTime (struct timeval *t) |
| void | ngcbSubTime (struct timeval t1, struct timeval t2, struct timeval *t3) |
| void | ngcbAddTime (struct timeval t1, struct timeval t2, struct timeval *t3) |
| void | ngcbAddSec (struct timeval *t, double seconds) |
| int | ngcbGetUTC (char *utc, int precision) |
| double | ngcbGetMJD (void) |
| void | ngcbTime2UTC (struct timeval t, char *utc, int precision) |
| double | ngcbTime2MJD (struct timeval t) |
| void | ngcbMJD2UTC (double mjd, char *utc, int precision) |
| double | ngcbUTC2MJD (const char *utc) |
| int | ngcbMicroSleep (int fd, int waitTime) |
| int | ngcbSleep (int fd, int waitTime) |
| void | ngcbAddTimeFrac (uint64_t *sec, uint64_t *nsec, double t) |
| void | ngcbTimeFrac2Str (char *value, uint64_t sec, uint64_t nsec) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| void ngcbAddSec | ( | struct timeval * | t, |
| double | seconds ) |
Add seconds to a time-stamp values. The value of seconds may be both positive or negative (or zero).
| void ngcbAddTime | ( | struct timeval | t1, |
| struct timeval | t2, | ||
| struct timeval * | t3 ) |
Add two time-stamp values and stores the result of (t1 + t2) in t3.
| void ngcbAddTimeFrac | ( | uint64_t * | sec, |
| uint64_t * | nsec, | ||
| double | t ) |
Add time (in seconds) to a fraction value (48 bit seconds and 30 bit nanoseconds + 16 bit fraction of nanoseconds).
| double ngcbGetMJD | ( | void | ) |
Get the current time as Modified Julian Date.
| int ngcbGetTime | ( | struct timeval * | t | ) |
Store a time-stamp.
| int ngcbGetUTC | ( | char * | utc, |
| int | precision ) |
Get the UTC in ISO format. If precision is greater than zero, then a fraction of seconds with precision digits is appended.
| int ngcbMicroSleep | ( | int | fd, |
| int | waitTime ) |
Suspend process execution for waitTime microseconds. The sleep can be interrupted by writing to the file descriptor fd which will be closed in that case. If fd has a negative value then the sleep cannot be interrupted.
| void ngcbMJD2UTC | ( | double | mjd, |
| char * | utc, | ||
| int | precision ) |
Convert a Modified Julian Date into UTC in ISO format. If precision is greater than zero, then a fraction of seconds with precision digits is appended.
| int ngcbSleep | ( | int | fd, |
| int | waitTime ) |
Suspend process execution for waitTime seconds. The sleep can be interrupted by writing to fd which will be closed in that case. If the termSock has a negative value, the sleep cannot be interrupted.
| void ngcbSubTime | ( | struct timeval | t1, |
| struct timeval | t2, | ||
| struct timeval * | t3 ) |
Subtracts two time-stamp values and stores the result of (t2 - t1) in t3.
| int ngcbTaiOffset | ( | ) |
Get TAI offset (seconds)
| double ngcbTime2MJD | ( | struct timeval | t | ) |
Return the Modified Julian Date of a time-stamp.
| void ngcbTime2UTC | ( | struct timeval | t, |
| char * | utc, | ||
| int | precision ) |
Convert the time-stamp into ISO-format. If precision is greater than zero, then a fraction of seconds with precision digits is appended.
| void ngcbTimeFrac2Str | ( | char * | value, |
| uint64_t | sec, | ||
| uint64_t | nsec ) |
Convert a time given in seconds and 30 bit nanoseconds + 16 bit fraction of nanoseconds to a string representing seconds in a high precision floating point number.
| double ngcbUTC2MJD | ( | const char * | utc | ) |
Convert an UTC time string in ISO format into Modified Julian Date format. A return value of 0.0 indicates a conversion error.