Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Query.hpp
1#pragma once
2
3#include "system/Config.hpp"
4#include "Common.hpp"
5
6#include <chrono>
7
12class Query {
13public:
14
15
18 Query();
19
21 void begin();
22
24 void end();
25
28 uint64_t value();
29
30private:
31
32 std::chrono::time_point<std::chrono::high_resolution_clock> _start;
33 std::chrono::time_point<std::chrono::high_resolution_clock> _end;
34 bool _running = false;
35};
Perform CPU duration measurement between two time points.
Definition: Query.hpp:12
std::chrono::time_point< std::chrono::high_resolution_clock > _end
Timing end point.
Definition: Query.hpp:33
Query()
Definition: Query.cpp:3
void end()
Definition: Query.cpp:16
std::chrono::time_point< std::chrono::high_resolution_clock > _start
Timing start point.
Definition: Query.hpp:32
uint64_t value()
Definition: Query.cpp:25
bool _running
Is a measurement currently taking place.
Definition: Query.hpp:34
void begin()
Definition: Query.cpp:7