taia.h (994B)
1 /* Public domain. */ 2 3 #ifndef TAIA_H 4 #define TAIA_H 5 6 #include "tai.h" 7 8 struct taia { 9 struct tai sec; 10 unsigned long nano; /* 0...999999999 */ 11 unsigned long atto; /* 0...999999999 */ 12 } ; 13 14 extern void taia_tai(const struct taia *,struct tai *); 15 16 extern void taia_now(struct taia *); 17 18 extern double taia_approx(const struct taia *); 19 extern double taia_frac(const struct taia *); 20 21 extern void taia_add(struct taia *,const struct taia *,const struct taia *); 22 extern void taia_addsec(struct taia *,const struct taia *,int); 23 extern void taia_sub(struct taia *,const struct taia *,const struct taia *); 24 extern void taia_half(struct taia *,const struct taia *); 25 extern int taia_less(const struct taia *,const struct taia *); 26 27 #define TAIA_PACK 16 28 extern void taia_pack(char *,const struct taia *); 29 extern void taia_unpack(const char *,struct taia *); 30 31 #define TAIA_FMTFRAC 19 32 extern unsigned int taia_fmtfrac(char *,const struct taia *); 33 34 extern void taia_uint(struct taia *,unsigned int); 35 36 #endif