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