blob: df5219c676566b7c0ba7f6a57a1cd3b31406fa01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* time.c
Get the current time. */
#include "uucp.h"
#if HAVE_TIME_H
#include <time.h>
#endif
#include "system.h"
#ifndef POSIX_HEADERS
#ifndef time
extern time_t time ();
#endif
#endif
/* Get the time in seconds since the epoch, with optional
microseconds. We use ixsysdep_process_time to get the microseconds
if it will work (it won't if it uses times, since that returns a
time based only on the process). */
long
ixsysdep_time (pimicros)
long *pimicros;
{
#if HAVE_GETTIMEOFDAY || HAVE_FTIME
return ixsysdep_process_time (pimicros);
#else
if (pimicros != NULL)
*pimicros = 0;
return (long) time ((time_t *) NULL);
#endif
}
|