Re-instate timediff(), needed in winmain.c
This commit is contained in:
parent
fc445c2b0a
commit
130d96ff2f
|
|
@ -40,6 +40,25 @@ datestring(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* return time interval in seconds and milliseconds */
|
||||||
|
|
||||||
|
#ifdef HAVE_FTIME
|
||||||
|
|
||||||
|
void timediff(struct timeb* now, struct timeb* begin, int* sec, int* msec)
|
||||||
|
{
|
||||||
|
|
||||||
|
*msec = (int)now->millitm - (int)begin->millitm;
|
||||||
|
*sec = (int)now->time - (int)begin->time;
|
||||||
|
if (*msec < 0) {
|
||||||
|
*msec += 1000;
|
||||||
|
(*sec)--;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Initialize time */
|
/* Initialize time */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,10 @@ char * datestring(void);
|
||||||
double seconds(void);
|
double seconds(void);
|
||||||
void timebegin(void);
|
void timebegin(void);
|
||||||
|
|
||||||
|
// Needed for WIN32
|
||||||
|
#ifdef HAVE_FTIME
|
||||||
|
void timediff(struct timeb*, struct timeb*, int*, int*);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue