mpv/osdep
wm4 5728295dab timer: fix a corner case on clock changes
It's conceivable that the OS time source is subject to clock changes.
The time could jump back to before when mpv was started, which would
cause mp_time_us() to return values smaller than 1. This is unexpected
by the code and could trigger assertions. If there's no monotonic time
source there's not much we can do anyway, so just sanitize the return
value. It will cause strange behavior until the "lost" time offset has
passed, but if you make such huge changes to the system clock while
everything is running, you're asking for trouble anyway.

(Normally we try to get a monotonic time source, though. This problem
sometimes happened on Windows when compiled without winpthreads, when
the code was falling back to gettimeofday(). This was already fixed by
always using another method.)
2015-07-04 17:24:10 +02:00
..
ar
win32
atomics.h
compiler.h
endian.h
glob-win.c
io.c
io.h
macosx_application.h
macosx_application.m
macosx_application_objc.h
macosx_compat.h
macosx_events.h
macosx_events.m
macosx_events_objc.h
macosx_versions.h
main-fn-cocoa.c
main-fn-unix.c
main-fn-win.c
main-fn.h
mpv.exe.manifest
mpv.rc
path-macosx.m
path-unix.c
path-win.c
path.h
semaphore.h
semaphore_osx.c
subprocess-posix.c subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
subprocess-win.c subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
subprocess.c
subprocess.h subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
terminal-unix.c terminal-unix: set terminal mode on init 2015-06-27 12:20:40 +02:00
terminal-win.c Various spelling fixes 2015-06-18 19:36:58 +02:00
terminal.h
threads.c
threads.h
timer-darwin.c
timer-linux.c
timer-win2.c win32: use QueryPerformanceCounter for timing 2015-07-04 15:54:14 +02:00
timer.c timer: fix a corner case on clock changes 2015-07-04 17:24:10 +02:00
timer.h
w32_keyboard.c Revert "win32: add mappings for some special keys" 2015-06-24 15:14:38 +02:00
w32_keyboard.h
win32-console-wrapper.c