#defineWIN32#include<sys/stat.h>//可以用#include<sys/time.h>//不可以用,//errorC1083:无法打开包括文件:“sys/time.h”:Nosuchfileordirectory//IntelliSense:无法打开源文件"sy... #define WIN32
#include <sys/stat.h> //可以用
#include <sys/time.h> //不可以用,
//error C1083: 无法打开包括文件: “sys/time.h”: No such file or directory
//IntelliSense: 无法打开 源 文件 "sys/time.h"
搜了一下说加上#define WIN32可以,但是依然没用

是想用下面这个:
struct timeval tv;
if(!gettimeofday(&tv,NULL))
{
return tv.tv_sec*1000.0 + tv.tv_usec/1000.0;
}
else
{
return 0;
}

请问如何解决呢