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