]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ntp/libntp/utvtoa.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ntp / libntp / utvtoa.c
1 /*
2  * utvtoa - return an asciized representation of an unsigned struct timeval
3  */
4 #include <stdio.h>
5
6 #include "lib_strbuf.h"
7
8 #if defined(VMS)
9 # include "ntp_fp.h"
10 #endif
11 #include "ntp_stdlib.h"
12 #include "ntp_unixtime.h"
13
14 char *
15 utvtoa(
16         const struct timeval *tv
17         )
18 {
19         register char *buf;
20
21         LIB_GETBUF(buf);
22         
23         (void) sprintf(buf, "%lu.%06lu", (u_long)tv->tv_sec,
24                        (u_long)tv->tv_usec);
25         return buf;
26 }