]> www.fi.muni.cz Git - evince.git/blob - pdf/goo/vms_unix_times.c
Break everything except bonobo-image-x-pdf :-)
[evince.git] / pdf / goo / vms_unix_times.c
1 /*
2  *      UNIX-style Time Functions
3  *
4  */
5 #include <stdio.h>
6 #include <signal.h>
7 #include <time.h>
8 #include "vms_unix_time.h"
9
10 /*
11  *      gettimeofday(2) - Returns the current time
12  *
13  *      NOTE: The timezone portion is useless on VMS.
14  *      Even on UNIX, it is only provided for backwards
15  *      compatibilty and is not guaranteed to be correct.
16  */
17
18 #if (__VMS_VER < 70000000)
19 int gettimeofday(tv, tz)
20 struct timeval  *tv;
21 struct timezone *tz;
22 {
23     timeb_t tmp_time;
24
25     ftime(&tmp_time);
26
27     if (tv != NULL)
28     {
29         tv->tv_sec  = tmp_time.time;
30         tv->tv_usec = tmp_time.millitm * 1000;
31     }
32
33     if (tz != NULL)
34     {
35         tz->tz_minuteswest = tmp_time.timezone;
36         tz->tz_dsttime = tmp_time.dstflag;
37     }
38
39     return (0);
40
41 } /*** End gettimeofday() ***/
42 #endif