summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-29 18:20:30 -0500
committerDudemanguy <random342@airmail.cc>2023-09-29 18:20:30 -0500
commit84fa7ea411e8e99fced66295c973ecdf94ee07b2 (patch)
tree82bce7e6217aba91ab0bc7b401f66d43ba87ca6c /osdep
parent0ba6ca6f76a0ed90b8f1bac6406a2b4e92dfe64f (diff)
downloadmpv-84fa7ea411e8e99fced66295c973ecdf94ee07b2.tar.bz2
mpv-84fa7ea411e8e99fced66295c973ecdf94ee07b2.tar.xz
msg: use nanosecond precision
The timestamps when making a log file is actually dependent on MP_START_TIME. This is a 10 microsecond offset that was added to the timer as an offset. With the nanosecond change, this unit needs to be converted as well so the offset is the same as before. After doing that, we need to change the various mp_time_us calls in msg to mp_time_ns and do the right conversion. This fixes the logs timestamps (i.e. so they aren't negative anymore).
Diffstat (limited to 'osdep')
-rw-r--r--osdep/timer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/timer.h b/osdep/timer.h
index 546d8fab41..d76ad16129 100644
--- a/osdep/timer.h
+++ b/osdep/timer.h
@@ -48,7 +48,7 @@ int mp_start_hires_timers(int wait_ms);
void mp_end_hires_timers(int resolution_ms);
#endif /* _WIN32 */
-#define MP_START_TIME 10000000
+#define MP_START_TIME 10 * INT64_C(1000000000)
// Duration of a second in mpv time.
#define MP_SECOND_US (1000 * 1000)