From c52258ddcd592116657cb3d320784afe03da3226 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Fri, 11 Feb 2022 16:03:41 -0800 Subject: [PATCH] Stopwatch uses Platform::ticks() --- src/time.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/time.cpp b/src/time.cpp index 6b916f4..569990e 100644 --- a/src/time.cpp +++ b/src/time.cpp @@ -1,8 +1,7 @@ #include -#include +#include "internal/platform.h" using namespace Blah; -using namespace std::chrono; u64 Time::ticks = 0; u64 Time::previous_ticks = 0; @@ -62,7 +61,7 @@ Stopwatch::Stopwatch() void Stopwatch::reset() { - start_time = std::chrono::duration_cast(system_clock::now().time_since_epoch()).count(); + start_time = Platform::ticks(); } u64 Stopwatch::milliseconds() const @@ -72,5 +71,5 @@ u64 Stopwatch::milliseconds() const u64 Stopwatch::microseconds() const { - return std::chrono::duration_cast(system_clock::now().time_since_epoch()).count() - start_time; + return Platform::ticks() - start_time; }