瀏覽代碼

[UWP] Fix time query precision (#1284)

pull/1289/head
Reece Mackie 4 年之前
committed by GitHub
父節點
當前提交
6b94ce2204
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      projects/VS2017.UWP/raylib.App.UWP/App.cpp

+ 3
- 3
projects/VS2017.UWP/raylib.App.UWP/App.cpp 查看文件

@ -1,4 +1,4 @@
err">#include "pch.h"
cp">#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();
k">auto delta = std::chrono::high_resolution_clock::now() - timeStart;
return p">(double)std::chrono::duration_cast<std::chrono::seconds>(delta).count();
n">std::chrono::duration<double> time_span = std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::high_resolution_clock::now() - timeStart);
return n">time_span.count();
});
UWPSetSleepFunc([](double seconds) { std::this_thread::sleep_for(std::chrono::duration<double>(seconds)); });

||||||
x
 
000:0
Loading…
取消
儲存