Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
win32timer.h
Go to the documentation of this file.
1
#pragma once
2
#ifndef WIN32_WIN32TIMER_H
3
#define WIN32_WIN32TIMER_H
4
//------------------------------------------------------------------------------
20
#include "
core/types.h
"
21
#include "
timing/time.h
"
22
23
//------------------------------------------------------------------------------
24
namespace
Win32
25
{
26
class
Win32Timer
27
{
28
public
:
30
Win32Timer
();
32
void
Start
();
34
void
Stop
();
36
void
Reset
();
38
bool
Running
()
const
;
40
Timing::Time
GetTime
()
const
;
42
Timing::Tick
GetTicks
()
const
;
43
44
private
:
46
__int64
InternalTime
()
const
;
47
48
bool
running
;
49
__int64
diffTime
;
// accumulated time when the timer was not running
50
__int64
stopTime
;
// when was the timer last stopped?
51
};
52
53
}
// namespace Win32
54
//------------------------------------------------------------------------------
55
#endif
56
Win32::Win32Timer::InternalTime
__int64 InternalTime() const
return internal time as 64 bit integer
Definition
win32timer.cc:93
Win32::Win32Timer::Running
bool Running() const
return true if currently running
Definition
win32timer.cc:83
Win32::Win32Timer::Reset
void Reset()
reset the timer
Definition
win32timer.cc:63
Win32::Win32Timer::GetTicks
Timing::Tick GetTicks() const
get current time in ticks
Definition
win32timer.cc:139
Win32::Win32Timer::running
bool running
Definition
win32timer.h:48
Win32::Win32Timer::stopTime
__int64 stopTime
Definition
win32timer.h:50
Win32::Win32Timer::Stop
void Stop()
stop the timer
Definition
win32timer.cc:51
Win32::Win32Timer::Start
void Start()
start/continue the timer
Definition
win32timer.cc:30
Win32::Win32Timer::Win32Timer
Win32Timer()
constructor
Definition
win32timer.cc:15
Win32::Win32Timer::diffTime
__int64 diffTime
Definition
win32timer.h:49
Win32::Win32Timer::GetTime
Timing::Time GetTime() const
get current time in seconds
Definition
win32timer.cc:119
Timing::Tick
int Tick
the tick datatype (one tick == 1 millisecond)
Definition
time.h:20
Timing::Time
double Time
the time datatype
Definition
time.h:18
Win32
[TODO: Describe Win32 subsystem]
time.h
Typedefs for the Timing subsystem.
types.h
code
foundation
timing
win32
win32timer.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.