diff options
author | Adam <Adam@anope.org> | 2011-03-30 00:55:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-30 00:55:45 -0400 |
commit | 8098ed899a3648897c0de925c974e21883a76b8d (patch) | |
tree | b46ae9bc84943be1a73ebbb56502250f6afe0de6 /src/win32/windows.cpp | |
parent | 77c98f0750da20bc565eb33b9a9d7bbbd1535006 (diff) |
Fixed windows build more, including ldap
Diffstat (limited to 'src/win32/windows.cpp')
-rw-r--r-- | src/win32/windows.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp index a443472f9..b57171dec 100644 --- a/src/win32/windows.cpp +++ b/src/win32/windows.cpp @@ -123,4 +123,20 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size) return NULL; } +/** 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, char *) +{ + SYSTEMTIME st; + GetSystemTime(&st); + + tv->tv_sec = Anope::CurTime; + tv->tv_usec = st.wMilliseconds; + + return 0; +} + #endif |