Nebula
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//------------------------------------------------------------------------------
24namespace Win32
25{
27{
28public:
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
44private:
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 implementation of the Time::Timer class.
Definition win32timer.h:27
__int64 InternalTime() const
return internal time as 64 bit integer
Definition win32timer.cc:93
bool Running() const
return true if currently running
Definition win32timer.cc:83
void Reset()
reset the timer
Definition win32timer.cc:63
Timing::Tick GetTicks() const
get current time in ticks
Definition win32timer.cc:139
bool running
Definition win32timer.h:48
__int64 stopTime
Definition win32timer.h:50
void Stop()
stop the timer
Definition win32timer.cc:51
void Start()
start/continue the timer
Definition win32timer.cc:30
Win32Timer()
constructor
Definition win32timer.cc:15
__int64 diffTime
Definition win32timer.h:49
Timing::Time GetTime() const
get current time in seconds
Definition win32timer.cc:119
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
double Time
the time datatype
Definition time.h:18
[TODO: Describe Win32 subsystem]
Typedefs for the Timing subsystem.