Alternate
e697dbe9c5997e35395fe158628dd8c5209481da
for Visual Studio 2022 and Windows 11.
読み取り中…
検索中…
一致する文字列を見つけられません
QueryPerformance.cpp
[詳解]
1
// ----------------------------------------------------------------------------
6
7
#include "
pch.h
"
8
#include "
QueryPerformance.h
"
9
10
using namespace
alt
;
11
12
QueryPerformance::QueryPerformance
()
13
{
14
_startTick
.QuadPart = 0;
15
_stopTick
.QuadPart = 0;
16
::QueryPerformanceFrequency (&
_frequency
);
17
}
18
19
VOID
QueryPerformance::Start
()
20
{
21
::QueryPerformanceCounter (&
_startTick
);
22
}
23
24
VOID
QueryPerformance::Stop
()
25
{
26
::QueryPerformanceCounter (&
_stopTick
);
27
}
28
29
double
QueryPerformance::PastTime
()
const
30
{
31
return
(
_stopTick
.QuadPart -
_startTick
.QuadPart) * 1000.0 \
32
/ (double)
_frequency
.QuadPart;
33
}
QueryPerformance.h
高分解能時間計測に関するWindowsAPIを集約したクラス
pch.h
プリコンパイル済みヘッダー ファイルです。
alt::QueryPerformance::_frequency
LARGE_INTEGER _frequency
現在のタイマー分解能
Definition:
QueryPerformance.h:52
alt::QueryPerformance::QueryPerformance
APIENTRY QueryPerformance()
コンストラクタ
Definition:
QueryPerformance.cpp:12
alt::QueryPerformance::_startTick
LARGE_INTEGER _startTick
開始時タイマー値
Definition:
QueryPerformance.h:46
alt::QueryPerformance::Start
VOID APIENTRY Start()
計測を開始します。
Definition:
QueryPerformance.cpp:19
alt::QueryPerformance::PastTime
double APIENTRY PastTime() const
計測開始〜計測終了までの時間を出力します。
Definition:
QueryPerformance.cpp:29
alt::QueryPerformance::_stopTick
LARGE_INTEGER _stopTick
終了時タイマー値
Definition:
QueryPerformance.h:49
alt::QueryPerformance::Stop
VOID APIENTRY Stop()
計測を終了します。
Definition:
QueryPerformance.cpp:24
alt
Definition:
DBLibrary.h:12
WindowsLibrary
QueryPerformance.cpp
構築:
1.9.6