diff options
author | dscho <dscho> | 2001-11-08 09:12:41 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-11-08 09:12:41 +0000 |
commit | 682027413c5f470b02ca8c168942c7c12c4f0d84 (patch) | |
tree | 2a5cc6c28020db59734fea1ff5fff4f90087e7c5 | |
parent | a6e540172b43c3eb3aee87250ceacbd63d227a14 (diff) | |
download | libtdevnc-682027413c5f470b02ca8c168942c7c12c4f0d84.tar.gz libtdevnc-682027413c5f470b02ca8c168942c7c12c4f0d84.zip |
gettimeofday for windows
-rw-r--r-- | main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -598,6 +598,20 @@ void rfbInitServer(rfbScreenInfoPtr rfbScreen) httpInitSockets(rfbScreen); } +#ifdef WIN32 +#include <fcntl.h> +#include <conio.h> +#include <sys/timeb.h> + +void gettimeofday(struct timeval* tv,char*) +{ + SYSTEMTIME t; + GetSystemTime(&t); + tv->tv_sec=t.wHour*3600+t.wMinute*60+t.wSecond; + tv->tv_usec=t.wMilliseconds*1000; +} +#endif + void rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec) { |