window compilation fix

This commit is contained in:
Paul Davis 2021-06-26 19:09:07 -06:00
parent c2f7b12b0d
commit 31a2d6f555

View File

@ -20,22 +20,13 @@
#include <gtkmm/button.h> #include <gtkmm/button.h>
#include <gtkmm/table.h> #include <gtkmm/table.h>
#ifdef PLATFORM_WINDOWS #include "pbd/microseconds.h"
#include <pbd/windows_timer_utils.h>
#endif
#include "temporal/time.h" #include "temporal/time.h"
#include "idleometer.h" #include "idleometer.h"
#include "pbd/i18n.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; using namespace Gtk;
IdleOMeter::IdleOMeter () IdleOMeter::IdleOMeter ()
@ -91,7 +82,7 @@ IdleOMeter::~IdleOMeter ()
bool bool
IdleOMeter::idle () IdleOMeter::idle ()
{ {
const int64_t now = _x_get_monotonic_usec (); const int64_t now = PBD::get_microseconds ();
const int64_t elapsed = now - _last; const int64_t elapsed = now - _last;
_max = std::max (_max, elapsed); _max = std::max (_max, elapsed);
@ -141,7 +132,7 @@ IdleOMeter::idle ()
void void
IdleOMeter::reset () IdleOMeter::reset ()
{ {
_last = _x_get_monotonic_usec (); _last = PBD::get_microseconds ();
_last_display = _last; _last_display = _last;
_start = _last; _start = _last;
_max = 0; _max = 0;