aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-17 09:03:57 -0700
committerChris Robinson <[email protected]>2014-04-17 09:03:57 -0700
commitd1f1a1d056b654bbe52c0b1ba6752b7a106482e1 (patch)
treee549f65f02cc97be3f42e9165a3407d9fcbc5abe /Alc/helpers.c
parent47f5c436c8f5e55ebafd72dcd155b2a762bb18ca (diff)
Make and use a C11-like altimespec_get wrapper function
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r--Alc/helpers.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index b8e5be03..e175c195 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -387,45 +387,6 @@ FILE *al_fopen(const char *fname, const char *mode)
#else
-#include <sched.h>
-#include <time.h>
-#include <sys/time.h>
-
-
-/* NOTE: This wrapper isn't quite accurate as it returns an ALuint, as opposed
- * to the expected DWORD. Both are defined as unsigned 32-bit types, however.
- * Additionally, Win32 is supposed to measure the time since Windows started,
- * as opposed to the actual time. */
-ALuint timeGetTime(void)
-{
-#if _POSIX_TIMERS > 0
- struct timespec ts;
- int ret = -1;
-
-#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0)
-#if _POSIX_MONOTONIC_CLOCK == 0
- static int hasmono = 0;
- if(hasmono > 0 || (hasmono == 0 &&
- (hasmono=sysconf(_SC_MONOTONIC_CLOCK)) > 0))
-#endif
- ret = clock_gettime(CLOCK_MONOTONIC, &ts);
-#endif
- if(ret != 0)
- ret = clock_gettime(CLOCK_REALTIME, &ts);
- assert(ret == 0);
-
- return ts.tv_nsec/1000000 + ts.tv_sec*1000;
-#else
- struct timeval tv;
- int ret;
-
- ret = gettimeofday(&tv, NULL);
- assert(ret == 0);
-
- return tv.tv_usec/1000 + tv.tv_sec*1000;
-#endif
-}
-
#ifdef HAVE_DLFCN_H
void *LoadLib(const char *name)