M.Z.
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
#include <assert.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
/*
|
||||
#include <sys/types.h>
|
||||
#if __VMS
|
||||
#include <sys/timeb.h>
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user