diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-18 11:13:46 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-18 11:27:10 +0000 |
commit | cb3848b7dbb7eeb809898b2fccab3ff2f0696e6e (patch) | |
tree | d40832e33a9918965869902f517837e90e752c76 /src/win32 | |
parent | 753119c4a16f6dafacbeb3d98fe72133badca949 (diff) |
Use clock_gettime if it is available.
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/anope_windows.h | 1 | ||||
-rw-r--r-- | src/win32/windows.cpp | 16 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/win32/anope_windows.h b/src/win32/anope_windows.h index fe75668bc..87eaff2a9 100644 --- a/src/win32/anope_windows.h +++ b/src/win32/anope_windows.h @@ -65,7 +65,6 @@ namespace Anope extern CoreExport void OnStartup(); extern CoreExport void OnShutdown(); extern CoreExport USHORT WindowsGetLanguage(const Anope::string &lang); -extern CoreExport int gettimeofday(timeval *tv, void *); extern int setenv(const char *name, const char *value, int overwrite); extern int unsetenv(const char *name); extern int mkstemp(char *input); diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp index dcdf9d1a9..f2a1da443 100644 --- a/src/win32/windows.cpp +++ b/src/win32/windows.cpp @@ -64,22 +64,6 @@ USHORT WindowsGetLanguage(const Anope::string &lang) return LANG_NEUTRAL; } -/** Like gettimeofday(), but it works on Windows. - * @param tv A timeval struct - * @param tz Should be NULL, it is not used - * @return 0 on success - */ -int gettimeofday(timeval *tv, void *) -{ - SYSTEMTIME st; - GetSystemTime(&st); - - tv->tv_sec = Anope::CurTime; - tv->tv_usec = st.wMilliseconds; - - return 0; -} - int setenv(const char *name, const char *value, int overwrite) { return SetEnvironmentVariable(name, value); |