diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 56c0e1129b..1bb1f52e09 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -35,8 +35,13 @@ musicclass::musicclass(void) void musicclass::audio_log_set_timestamp(void) { - clock_gettime(CLOCK_REALTIME, &audio_log_t); - sprintf(audio_log_timestring_lol, "%lu.%lu", audio_log_t.tv_sec, audio_log_t.tv_nsec); + clock_gettime(CLOCK_REALTIME, &audio_log_t_realtime); + clock_gettime(CLOCK_MONOTONIC_RAW, &audio_log_t_monotonic); + + sprintf(audio_log_timestring_lol, "%lu.%lu;%lu.%lu", + audio_log_t_realtime.tv_sec, audio_log_t_realtime.tv_nsec, + audio_log_t_monotonic.tv_sec, audio_log_t_monotonic.tv_nsec + ); } void musicclass::start_audio_log(void) diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index b6b95fa78f..29b86610e0 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -80,7 +80,8 @@ class musicclass int num_mmmmmm_tracks; // Audio log - struct timespec audio_log_t; + struct timespec audio_log_t_realtime; + struct timespec audio_log_t_monotonic; char audio_log_timestring_lol[100]; bool audio_log_started;