diff options
| author | Reece Mackie <[email protected]> | 2020-06-20 20:13:32 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-20 21:13:32 +0200 |
| commit | 6b94ce2204431c33f93cf4888092b725c3b402ec (patch) | |
| tree | eac52444d6569b0d3fae75e7c791f2d59fa6b20d /projects | |
| parent | 7ed7116e27def844732589c6a7a1aecc2612227f (diff) | |
| download | raylib-6b94ce2204431c33f93cf4888092b725c3b402ec.tar.gz raylib-6b94ce2204431c33f93cf4888092b725c3b402ec.zip | |
[UWP] Fix time query precision (#1284)
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/VS2017.UWP/raylib.App.UWP/App.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/projects/VS2017.UWP/raylib.App.UWP/App.cpp b/projects/VS2017.UWP/raylib.App.UWP/App.cpp index 84eb99e5..bf1898a9 100644 --- a/projects/VS2017.UWP/raylib.App.UWP/App.cpp +++ b/projects/VS2017.UWP/raylib.App.UWP/App.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "pch.h" #include "app.h" #include <Windows.h> @@ -99,8 +99,8 @@ void App::Run() UWPSetQueryTimeFunc([]() { static auto timeStart = std::chrono::high_resolution_clock::now(); - auto delta = std::chrono::high_resolution_clock::now() - timeStart; - return (double)std::chrono::duration_cast<std::chrono::seconds>(delta).count(); + std::chrono::duration<double> time_span = std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::high_resolution_clock::now() - timeStart); + return time_span.count(); }); UWPSetSleepFunc([](double seconds) { std::this_thread::sleep_for(std::chrono::duration<double>(seconds)); }); |
