summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 19:36:41 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-18 19:36:41 +0000
commit7e46119759b7099c38f543bd38d0186b9806542f (patch)
treeb31264c454e26566b2e70c2794b89d77f4e28c44 /win
parent42592c0083505777e8fb8e4bf09182528229a787 (diff)
Remove excessive gettimeofday system calls
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'win')
-rw-r--r--win/inspircd_win32wrapper.cpp4
-rw-r--r--win/inspircd_win32wrapper.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index 8291cd60d..d82c90a61 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -549,14 +549,14 @@ void FindDNS(std::string& server)
ServerInstance->Logs->Log("CONFIG",DEFAULT,"<dns:server> set to '%s' as first active resolver in registry.", nameserver.c_str());
}
-int gettimeofday(struct timeval * tv, void * tz)
+int clock_gettime(int clock, struct timespec * tv)
{
if(tv == NULL)
return -1;
DWORD mstime = timeGetTime();
tv->tv_sec = time(NULL);
- tv->tv_usec = (mstime - (tv->tv_sec * 1000)) * 1000;
+ tv->tv_usec = (mstime - (tv->tv_sec * 1000)) * 1000000;
return 0;
}
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index 4397d2ad3..3f16280fd 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -193,7 +193,8 @@ CoreExport DIR * opendir(const char * path);
CoreExport dirent * readdir(DIR * handle);
CoreExport void closedir(DIR * handle);
-CoreExport int gettimeofday(struct timeval * tv, void * tz);
+const int CLOCK_REALTIME = 0;
+CoreExport int clock_gettime(int clock, struct timespec * tv);
/* Disable these stupid warnings.. */
#pragma warning(disable:4800)