1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #if defined(LIBC_SCCS) && !defined(lint)
8: static char sccsid[] = "@(#)ftime.c 5.2 (Berkeley) 3/9/86";
9: #endif LIBC_SCCS and not lint
10:
11: #include <sys/types.h>
12: #include <sys/time.h>
13:
14: /*
15: * Backwards compatible ftime.
16: */
17:
18: /* from old timeb.h */
19: struct timeb {
20: time_t time;
21: u_short millitm;
22: short timezone;
23: short dstflag;
24: };
25:
26: ftime(tp)
27: register struct timeb *tp;
28: {
29: struct timeval t;
30: struct timezone tz;
31:
32: if (gettimeofday(&t, &tz) < 0)
33: return (-1);
34: tp->time = t.tv_sec;
35: tp->millitm = t.tv_usec / 1000;
36: tp->timezone = tz.tz_minuteswest;
37: tp->dstflag = tz.tz_dsttime;
38: }
Defined functions
ftime
defined in line
26; used 32 times
- in /usr/ingres/source/dbu/save.c line
116
- in /usr/src/etc/ac.c line
259
- in /usr/src/games/compat/unixtraps.c line
535
- in /usr/src/new/kermit/ckutio.c line
1350-1353(2),
1388-1391(2)
- in /usr/src/new/mh/zotnet/tws/dtime.c line
162
- in /usr/src/new/rcs/src/maketime.c line
196
- in /usr/src/usr.bin/refer/tick.c line
21,
33
- in /usr/src/usr.bin/uucp/cntrl.c line
150,
314
- in /usr/src/usr.bin/uucp/condevs.c line
401-402(2)
- in /usr/src/usr.bin/uucp/fio.c line
188,
210,
261,
280
- in /usr/src/usr.bin/uucp/gio.c line
104,
120,
157,
174
- in /usr/src/usr.bin/uucp/logent.c line
95,
192
- in /usr/src/usr.bin/uucp/tio.c line
108,
138,
171,
204
- in /usr/src/usr.bin/uucp/ulockf.c line
176
- in /usr/src/usr.lib/sendmail/src/arpadate.c line
76,
97
Defined variables
sccsid
defined in line
8;
never used
Defined struct's
timeb
defined in line
19; used 2 times