64bit fixes.
[AROS-Contrib.git] / arospdf / goo / vms_unix_times.c
blob004c0d04b29cc21578167f6f5a650fbe14a74e50
1 /*
2 * UNIX-style Time Functions
4 */
5 #include <stdio.h>
6 #include <signal.h>
7 #include <time.h>
8 #include "vms_unix_time.h"
11 * gettimeofday(2) - Returns the current time
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.
18 #if (__VMS_VER < 70000000)
19 int gettimeofday(tv, tz)
20 struct timeval *tv;
21 struct timezone *tz;
23 timeb_t tmp_time;
25 ftime(&tmp_time);
27 if (tv != NULL)
29 tv->tv_sec = tmp_time.time;
30 tv->tv_usec = tmp_time.millitm * 1000;
33 if (tz != NULL)
35 tz->tz_minuteswest = tmp_time.timezone;
36 tz->tz_dsttime = tmp_time.dstflag;
39 return (0);
41 } /*** End gettimeofday() ***/
42 #endif