mpv/osdep
wm4 3620cf97ad timer: switch to CLOCK_MONOTONIC
Apparently, this is always _really_ monotonic, despite what the Linux
manpages say. So this should be much better than gettimeofday(). (At
times there were kernel bugs which broke the monotonic property.)

From the perspective of the player, time can still be discontinuous
(you could just stop the process with ^Z), but at least it's guaranteed
to be monotonic without further hacks required.

Also note that clock_gettime() returns the time in nanoseconds. We want
microseconds only, because that's the unit we chose internally. Another
problem is that nanoseconds can wrap pretty quickly (less than 300 years
in 63 bits), so it's just better to use microseconds. The devision won't
make the code that much slower (compilers can avoid a real division).

Note: this expects that the system provides clock_gettime() as well as
CLOCK_MONOTONIC. Both are optional according to POSIX. The only system
I know which doesn't have these, OSX, has seperate timer code anyway,
but I still don't know whether more obscure (yet supported) platforms
have a problem with this, so I'm playing safely. But this still expects
that CLOCK_MONOTONIC always works at runtime if it's defined.
2014-03-09 16:49:02 +01:00
..
ar HIDRemote: remove OS X version checks 2013-09-17 20:44:54 +02:00
glob-win.c osdep:/glob-win.c: reformat 2012-08-03 01:31:32 +02:00
glob.h Reduce recursive config.h inclusions in headers 2013-12-18 17:12:21 +01:00
io.c io: make MP_PATH_MAX private to win32 code 2014-02-03 22:12:30 +01:00
io.h io: make MP_PATH_MAX private to win32 code 2014-02-03 22:12:30 +01:00
macosx_application.h cocoa: remove usage of mp_fifo 2013-07-03 22:25:45 +02:00
macosx_application.m cocoa: fix deadlock during initialization [2] 2014-02-13 22:22:44 +01:00
macosx_application_objc.h cocoa: handle files drag and drop on the player video view 2014-01-04 17:29:53 +01:00
macosx_compat.h OSX: fix compilation with 10.7 SDK 2013-06-19 21:24:26 +02:00
macosx_events.h Move mpvcore/input/ to input/ 2013-12-17 01:23:09 +01:00
macosx_events.m Fix OSX build; remove all remaining mpvcore references 2013-12-17 08:44:21 +01:00
mpv.exe.manifest win32: edit resource files, in particular set CompanyName 2013-09-23 01:44:09 +02:00
mpv.rc Update copyright year 2014-01-01 00:00:00 +01:00
numcores.c vd_ffmpeg: set thread count to number of cores on machine by default 2010-12-20 05:53:28 +02:00
numcores.h vd_ffmpeg: set thread count to number of cores on machine by default 2010-12-20 05:53:28 +02:00
path-macosx.m path-macosx: attempt to fix build 2013-12-22 01:36:45 +01:00
path-win.c win32: restore support for exe directory as config directory 2014-02-14 21:55:04 +01:00
path.h path lookup functions: mp_msg conversions 2013-12-21 21:43:17 +01:00
priority.c osdep/priority: drop message output when setting priority 2013-12-21 20:50:11 +01:00
priority.h cosmetics: Remove pointless empty lines at EOF. 2010-02-20 21:02:49 +00:00
terminal-unix.c terminal-unix: fix terminfo/termcap name for cursor up 2014-01-14 17:37:40 +01:00
terminal-win.c w32: use the w32_common keymap in terminal-win too 2014-01-19 14:42:15 +01:00
terminal.h player: redo terminal OSD and status line handling 2014-01-13 20:08:13 +01:00
threads.c threads: fix wait time overflow check 2014-02-26 21:03:35 +01:00
threads.h threads: add a dispatch queue thing 2014-02-10 00:04:39 +01:00
timer-darwin.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
timer-linux.c timer: switch to CLOCK_MONOTONIC 2014-03-09 16:49:02 +01:00
timer-win2.c timer: init only once 2014-02-10 01:12:34 +01:00
timer.c timer: add utility function to get relative time 2014-02-28 23:18:52 +01:00
timer.h timer: add utility function to get relative time 2014-02-28 23:18:52 +01:00
w32_keyboard.c w32: use the w32_common keymap in terminal-win too 2014-01-19 14:42:15 +01:00
w32_keyboard.h w32: use the w32_common keymap in terminal-win too 2014-01-19 14:42:15 +01:00
win32-console-wrapper.c win32-console-wrapper: use child process exit code 2014-01-06 13:31:15 +01:00