diff options
author | Max Kellermann <max@duempel.org> | 2013-10-15 09:38:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-15 09:38:12 +0200 |
commit | 0c13703da3641951bf061cac7c5cef034eda16f9 (patch) | |
tree | 53af5b78031142e475a683d7bbc6c580b1d0e297 /src/Timer.cxx | |
parent | b97b7a7493c0535cd21d05189c1a5b7cdd0accb2 (diff) | |
download | mpd-0c13703da3641951bf061cac7c5cef034eda16f9.tar.gz mpd-0c13703da3641951bf061cac7c5cef034eda16f9.tar.xz mpd-0c13703da3641951bf061cac7c5cef034eda16f9.zip |
system/clock: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/Timer.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Timer.cxx b/src/Timer.cxx index 75fba03aa..e32ebe04b 100644 --- a/src/Timer.cxx +++ b/src/Timer.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "Timer.hxx" #include "AudioFormat.hxx" -#include "system/clock.h" +#include "system/Clock.hxx" #include <glib.h> @@ -37,7 +37,7 @@ Timer::Timer(const AudioFormat af) void Timer::Start() { - time = monotonic_clock_us(); + time = MonotonicClockUS(); started = true; } @@ -58,7 +58,7 @@ void Timer::Add(int size) unsigned Timer::GetDelay() const { - int64_t delay = (int64_t)(time - monotonic_clock_us()) / 1000; + int64_t delay = (int64_t)(time - MonotonicClockUS()) / 1000; if (delay < 0) return 0; @@ -74,7 +74,7 @@ void Timer::Synchronize() const assert(started); - sleep_duration = time - monotonic_clock_us(); + sleep_duration = time - MonotonicClockUS(); if (sleep_duration > 0) g_usleep(sleep_duration); } |