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