diff options
author | wm4 <wm4@nowhere> | 2015-05-11 23:44:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-11 23:44:36 +0200 |
commit | 92b9d75d7256be71d8c8b18438af9494b78f0e96 (patch) | |
tree | eaf114423ce898dc5ac77f5fa48c3f13ef699c41 /osdep/timer.h | |
parent | ca9964a4fb6b1faa0155da43b3c815db0075e2d5 (diff) | |
download | mpv-92b9d75d7256be71d8c8b18438af9494b78f0e96.tar.bz2 mpv-92b9d75d7256be71d8c8b18438af9494b78f0e96.tar.xz |
threads: use utility+POSIX functions instead of weird wrappers
There is not much of a reason to have these wrappers around. Use POSIX
standard functions directly, and use a separate utility function to take
care of the timespec calculations. (Course POSIX for using this weird
format for time values.)
Diffstat (limited to 'osdep/timer.h')
-rw-r--r-- | osdep/timer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/osdep/timer.h b/osdep/timer.h index 547323943d..427bcc3ccb 100644 --- a/osdep/timer.h +++ b/osdep/timer.h @@ -52,4 +52,8 @@ int64_t mp_add_timeout(int64_t time_us, double timeout_sec); // Convert the mp time in microseconds to a timespec using CLOCK_REALTIME. struct timespec mp_time_us_to_timespec(int64_t time_us); +// Convert the relative timeout in seconds to a timespec. +// The timespec is absolute, using CLOCK_REALTIME. +struct timespec mp_rel_time_to_timespec(double timeout_sec); + #endif /* MPLAYER_TIMER_H */ |