From 31a2d6f555ffdf1c6b4821569bb6a51ef2fb07f7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 26 Jun 2021 19:09:07 -0600 Subject: [PATCH] window compilation fix --- gtk2_ardour/idleometer.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/idleometer.cc b/gtk2_ardour/idleometer.cc index 556aeac2a2..5e60f11bbe 100644 --- a/gtk2_ardour/idleometer.cc +++ b/gtk2_ardour/idleometer.cc @@ -20,22 +20,13 @@ #include #include -#ifdef PLATFORM_WINDOWS -#include -#endif +#include "pbd/microseconds.h" #include "temporal/time.h" #include "idleometer.h" #include "pbd/i18n.h" -static int64_t _x_get_monotonic_usec() { -#ifdef PLATFORM_WINDOWS - return PBD::get_microseconds(); -#endif - return g_get_monotonic_time(); -} - using namespace Gtk; IdleOMeter::IdleOMeter () @@ -91,7 +82,7 @@ IdleOMeter::~IdleOMeter () bool IdleOMeter::idle () { - const int64_t now = _x_get_monotonic_usec (); + const int64_t now = PBD::get_microseconds (); const int64_t elapsed = now - _last; _max = std::max (_max, elapsed); @@ -141,7 +132,7 @@ IdleOMeter::idle () void IdleOMeter::reset () { - _last = _x_get_monotonic_usec (); + _last = PBD::get_microseconds (); _last_display = _last; _start = _last; _max = 0;