Scanframe Modular Application
0.1.0
Loading...
Searching...
No Matches
PerformanceTimer.h
Go to the documentation of this file.
1
#pragma once
2
#include <
misc/gen/TimeSpec.h
>
3
4
namespace
sf
5
{
6
10
class
_MISC_CLASS
PerformanceTimer
11
{
12
public
:
16
PerformanceTimer
();
17
21
PerformanceTimer
(
const
PerformanceTimer
& pt) =
default
;
22
26
PerformanceTimer
&
operator=
(
const
PerformanceTimer
& pt)
27
{
28
if
(
this
!= &pt)
29
{
30
_start = pt.
_start
;
31
}
32
return
*
this
;
33
}
34
38
void
reset
();
39
43
TimeSpec
elapse
();
44
48
TimeSpec
elapse
(
const
TimeSpec
& ts);
49
53
unsigned
long
elapseUSec
();
54
58
unsigned
long
elapseMSec
();
59
60
protected
:
64
TimeSpec
_start
;
65
};
66
67
}
// namespace sf
TimeSpec.h
sf::PerformanceTimer
High resolution timer for testing performance.
Definition
PerformanceTimer.h:11
sf::PerformanceTimer::PerformanceTimer
PerformanceTimer(const PerformanceTimer &pt)=default
Copy constructor.
sf::PerformanceTimer::elapseUSec
unsigned long elapseUSec()
Returns the current elapsed time in micro seconds since the last reset.
sf::PerformanceTimer::reset
void reset()
Resets the time to start measuring.
sf::PerformanceTimer::operator=
PerformanceTimer & operator=(const PerformanceTimer &pt)
Assignment operator.
Definition
PerformanceTimer.h:26
sf::PerformanceTimer::elapse
TimeSpec elapse(const TimeSpec &ts)
Returns the current elapsed time in seconds since the last reset.
sf::PerformanceTimer::elapse
TimeSpec elapse()
Returns the current elapsed time in seconds since the last reset.
sf::PerformanceTimer::PerformanceTimer
PerformanceTimer()
Default constructor. Initializes the timer and resets it.
sf::PerformanceTimer::elapseMSec
unsigned long elapseMSec()
Returns the current elapsed time in milli seconds since the last reset.
sf::PerformanceTimer::_start
TimeSpec _start
Holds the start time.
Definition
PerformanceTimer.h:64
_MISC_CLASS
#define _MISC_CLASS
Definition
misc/global.h:40
sf
Definition
Application.h:10
sf::TimeSpec
Class wrapper for timespec structure to modify.
Definition
TimeSpec.h:12
src
com
misc
gen
PerformanceTimer.h
Generated by
1.9.8