From f3d5157564992f1ef9f390b3ce0c7d3706ba0f19 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
The meat and potatoes of all this is that programmers cannot simply rely on standard Unix APIs such as -gettimeofday() +gettimeofday() (which, by the way, is marked as obsolescent, but it's not going to disappear tomorrow) to measure time intervals or even to give precise absolute time, and in any case those APIs will become obsolete in 2038. @@ -74,7 +74,7 @@ any case those APIs will become obsolete in 2038.
tai implements - among other things - the -TAI64 and TAI64N +TAI64 and TAI64N formats, which are used in all of skalibs. This gives a programmer access to precise linear absolute time, which is suitable for both timestamping (wallclock usage) and time interval measurements @@ -84,7 +84,7 @@ represent dates exceeding the estimated lifespan of the universe).
tai has been inspired by Dan J. Bernstein's -libtai library, but does not +libtai library, but does not borrow any code from it.
@@ -96,10 +96,10 @@ precision. A tain_t structure holds an absolute date with a maximum of one-nanosecond precision, as permitted by the underlying system call. If flag-usert is clear, the system clock will be read via -gettimeofday() +gettimeofday() system call, which has a one-microsecond precision; if it is set, the system clock will be read via the -clock_gettime() +clock_gettime() system call, which has a one-nanosecond precision. In either case, a current tain_t will be unable to be more precise than the underlying implementation. @@ -180,7 +180,7 @@ start of a program.The following two operations can only succeed if your system provides the -clock_gettime() +clock_gettime() primitive with at least one of the CLOCK_MONOTONIC or CLOCK_BOOTTIME clocks. Otherwise, they will fail with errno set to ENOSYS.
@@ -333,7 +333,7 @@ depending on whether skalibs was compiled with the --enable-tai-clock configure option). This is useful to get valid TAI/TAI64N timestamps out of information exported by the system, for instance the time_t -returned by time(), +returned by time(), or in the st_atim, st_mtim or st_ctim fields of a struct stat. @@ -427,14 +427,14 @@ Those functions return nonzero iff *t1 is lesser than *t2. Marshals *t into the buffer s points to, which must be preallocated with at least TAI_PACK (8) characters. Afterwards, the buffer contains the -external TAI64 format +external TAI64 format representation of *t.
void tai_unpack (char const *s, tai_t *t)
Unmarshals the
-external TAI64 format
+external TAI64 format
label pointed to by s (at least TAI_PACK characters) and stores
the result into t.
void tain_pack (char *s, tain_t const *a)
void tain_unpack (char const *s, tain_t *a)