extern int taia_add(struct taia *t,const struct taia *a,const struct taia *b);
extern int taia_addsec(struct taia *t,const struct taia *s,int secs);
extern int taia_approx(const struct taia *t);
int taia_frac(const struct taia *t);
extern int taia_less(const struct tai *a,const struct tai *b);
extern int taia_now(struct taia *t);
extern int taia_pack(char *buf,const struct taia *t);
extern int taia_sub(struct taia *t,const struct taia *a,const struct taia *b);
extern int taia_tai(const struct taia *t,struct tai *sec);
extern int taia_uint(struct taia *t,unsigned int secs);
extern int taia_unpack(const char *buf,struct taia *t);
taia_addsec adds secs seconds to s and writes the result to t. The inputs and output may overlap.
taia_approx returns a double-precision approximation of t. The result of taia_approx is always nonnegative.
taia_frac returns a double-precision approximation to the fraction part of t. The result of taia_frac is always nonnegative.
taia_less returns 1 if a is less than b, 0 otherwise.
taia_now puts the current time into t. More precisely: tai_now puts into t its best guess as to the TAI64NA label for the 1-attosecond interval that contains the current time.
This implementation of taia_now assumes that the time_t returned from the time function represents the number of TAI seconds since 1970-01-01 00:00:10 TAI. This matches the convention used by the Olson tz library in ``right'' mode.
Beware that many clocks are not set accurately, and even the best scientific clocks are nowhere near 1-attosecond accuracy; however, an inaccurate clock may still produce reasonably accurate time differences.
taia_pack converts a TAI64NA label from internal format in t to external TAI64NA format in buf.
taia_sub subtracts b from a and writes the result to t. The inputs and output may overlap.
taia_tai places into sec the integer part of t. If t contains a TAI64NA label then sec will contain the corresponding TAI64 label.
taia_uint converts secs into a struct taia (setting the fractional part to zero).
taia_unpack converts a TAI64NA label from external TAI64NA format in buf to internal format in t.