summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-11 10:39:57 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-11 10:39:57 +0000
commit5ccc705d9a256ee7b8297c605838fdc2708b1fd5 (patch)
treead2e847dea6b34dd425096241a5fb404109ddfd2 /osdep
parent35f5b481931082ee038e7c4742b9463c4d544eff (diff)
downloadmpv-5ccc705d9a256ee7b8297c605838fdc2708b1fd5.tar.bz2
mpv-5ccc705d9a256ee7b8297c605838fdc2708b1fd5.tar.xz
obsoleted by timer-darwin.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10281 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep')
-rw-r--r--osdep/timer-macosx.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/osdep/timer-macosx.c b/osdep/timer-macosx.c
deleted file mode 100644
index ee2200ddc1..0000000000
--- a/osdep/timer-macosx.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Semi-precise timer routines using CoreFoundation
- *
- * (C) 2003 Dan Christiansen
- *
- * Released into the public domain.
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/time.h>
-#include "../config.h"
-
-#ifdef MACOSX
-# include <CoreFoundation/CFRunLoop.h>
-#endif
-
-/* Rather than using CF timers, we simply store the absolute time
- * CFAbsoluteTime == double */
-static CFAbsoluteTime relative_time;
-
-int usec_sleep(int usec_delay)
-{
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, usec_delay / 1000000.0, false);
-}
-
-
-// Returns current time in microseconds
-unsigned int GetTimer(){
- return (unsigned int)(CFAbsoluteTimeGetCurrent() * 1000000);
-}
-
-// Returns current time in milliseconds
-unsigned int GetTimerMS(){
- return (unsigned int)(CFAbsoluteTimeGetCurrent() * 1000);
-}
-
-// Returns time spent between now and last call in seconds
-float GetRelativeTime(){
- CFAbsoluteTime last_time = relative_time;
- relative_time = CFAbsoluteTimeGetCurrent();
- return (float)(relative_time - last_time);
-}
-
-// Initialize timer, must be called at least once at start
-void InitTimer(){
- GetRelativeTime();
-}
-
-#if 0
-int main() {
- int i;
-
- for (i = 0; i < 20; i++) {
- printf("CF relative time:\t%f\n", GetRelativeTime());
- usec_sleep(1000000);
- printf("usleep relative time:\t%f\n", GetRelativeTime());
- usleep(1000000);
- }
-}
-#endif
-
-