20 lines
320 B
C++
20 lines
320 B
C++
#include "Unix2NT.h"
|
|
#ifdef _UNIX_
|
|
# include <sys/time.h>
|
|
#endif
|
|
#include <sys/timeb.h>
|
|
#include <sys/types.h>
|
|
#include <time.h>
|
|
#ifndef _UNIX_
|
|
int gettimeofday(struct timeval* tp)
|
|
{
|
|
struct timeb tm;
|
|
ftime(&tm);
|
|
tp->tv_sec=tm.time;
|
|
tp->tv_usec=tm.millitm;
|
|
tp->tv_usec*=1000;
|
|
|
|
return 1;
|
|
}
|
|
#endif
|