From b6214b2644148bf68ae781983ed81f972ebc5137 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 May 2018 23:34:23 +0200 Subject: timer: remove an unused helper function It's also dumb. --- osdep/timer.c | 10 ---------- osdep/timer.h | 6 ------ 2 files changed, 16 deletions(-) (limited to 'osdep') diff --git a/osdep/timer.c b/osdep/timer.c index f75aec76f3..c624b66e70 100644 --- a/osdep/timer.c +++ b/osdep/timer.c @@ -59,16 +59,6 @@ double mp_time_sec(void) return mp_time_us() / (double)(1000 * 1000); } -int64_t mp_time_relative_us(int64_t *t) -{ - int64_t r = 0; - int64_t now = mp_time_us(); - if (*t) - r = now - *t; - *t = now; - return r; -} - int64_t mp_add_timeout(int64_t time_us, double timeout_sec) { assert(time_us > 0); // mp_time_us() returns strictly positive values diff --git a/osdep/timer.h b/osdep/timer.h index b4a64c7820..78457d9b9a 100644 --- a/osdep/timer.h +++ b/osdep/timer.h @@ -39,12 +39,6 @@ void mp_sleep_us(int64_t us); #define MP_START_TIME 10000000 -// Return the amount of time that has passed since the last call, in -// microseconds. *t is used to calculate the time that has passed by storing -// the current time in it. If *t is 0, the call will return 0. (So that the -// first call will return 0, instead of the absolute current time.) -int64_t mp_time_relative_us(int64_t *t); - // Add a time in seconds to the given time in microseconds, and return it. // Takes care of possible overflows. Never returns a negative or 0 time. int64_t mp_add_timeout(int64_t time_us, double timeout_sec); -- cgit v1.2.3