uqs's projects
/
games.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Initial import from FreeBSD RELENG_4:
[games.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
}