From d0c9176d6d486203de929f4fc20af59637591f30 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Wed, 2 Sep 2020 07:50:56 +0200 Subject: [PATCH] Log frametime as nanoseconds --- src/logging.cpp | 3 ++- src/logging.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/logging.cpp b/src/logging.cpp index d00107c..4a2a56a 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -7,6 +7,7 @@ string os, cpu, gpu, ram, kernel, driver; bool sysInfoFetched = false; double fps; +uint64_t frametime; logData currentLogData = {}; std::unique_ptr logger; @@ -73,7 +74,7 @@ void writeFile(string filename){ out << logArray[i].gpu_mem_clock << ","; out << logArray[i].gpu_vram_used << ","; out << logArray[i].ram_used << ","; - out << std::chrono::duration_cast(logArray[i].previous).count() << "\n"; + out << std::chrono::duration_cast(logArray[i].previous).count() << "\n"; } logger->clear_log_data(); } diff --git a/src/logging.h b/src/logging.h index bd981da..a7397b9 100644 --- a/src/logging.h +++ b/src/logging.h @@ -16,7 +16,7 @@ using namespace std; struct logData{ double fps; - double frametime; + uint64_t frametime; int cpu_load; int gpu_load; int cpu_temp; @@ -70,6 +70,7 @@ extern std::unique_ptr logger; extern string os, cpu, gpu, ram, kernel, driver; extern bool sysInfoFetched; extern double fps; +extern uint64_t frametime; extern logData currentLogData; string exec(string command);