diff --git a/tecs/myc_time.c b/tecs/myc_time.c index f8c88dbd..3daf1009 100644 --- a/tecs/myc_time.c +++ b/tecs/myc_time.c @@ -1,11 +1,9 @@ #include #include #include -/* -#include +#if __VMS #include -int ftime (struct timeb *__timeptr); -*/ +#endif #include "myc_fortran.h" #include "myc_time.h" @@ -38,19 +36,21 @@ int mycNow(void) { } int mycMsecSince(int since) { -/* +#if __VMS struct timeb now; -*/ +#else struct timeval now; +#endif int msec; if (my_base == 0) initBase(); -/* +#if __VMS ftime(&now); msec = (now.time - my_base) % (24*3600) * 1000 + now.millitm - since; -*/ +#else gettimeofday(&now, NULL); msec = (now.tv_sec - my_base) % (24*3600) * 1000 + now.tv_usec/1000 - since; +#endif if (msec < 0) msec+=24*3600000; return msec; }