Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
darwintimer.h
Go to the documentation of this file.
1
#pragma once
2
#ifndef DARWIN_DARWINTIMER_H
3
#define DARWIN_DARWINTIMER_H
4
//------------------------------------------------------------------------------
14
#include "
core/types.h
"
15
#include "
timing/time.h
"
16
17
//------------------------------------------------------------------------------
18
namespace
Darwin
19
{
20
class
DarwinTimer
21
{
22
public
:
24
DarwinTimer
();
26
void
Start
();
28
void
Stop
();
30
void
Reset
();
32
bool
Running
()
const
;
34
Timing::Time
GetTime
()
const
;
36
uint
GetTicks
()
const
;
37
38
private
:
40
uint64_t
InternalTime
()
const
;
41
42
bool
running
;
43
uint64_t
diffTime
;
// accumulated time when the timer was not running
44
uint64_t
stopTime
;
// when was the timer last stopped?
45
};
46
47
}
// namespace Darwin
48
//------------------------------------------------------------------------------
49
#endif
50
Darwin::DarwinTimer::GetTime
Timing::Time GetTime() const
get current time in seconds
Definition
darwintimer.cc:121
Darwin::DarwinTimer::DarwinTimer
DarwinTimer()
constructor
Definition
darwintimer.cc:18
Darwin::DarwinTimer::InternalTime
uint64_t InternalTime() const
return internal time as 64 bit integer
Definition
darwintimer.cc:95
Darwin::DarwinTimer::Running
bool Running() const
return true if currently running
Definition
darwintimer.cc:85
Darwin::DarwinTimer::stopTime
uint64_t stopTime
Definition
darwintimer.h:44
Darwin::DarwinTimer::running
bool running
Definition
darwintimer.h:42
Darwin::DarwinTimer::Reset
void Reset()
reset the timer
Definition
darwintimer.cc:65
Darwin::DarwinTimer::diffTime
uint64_t diffTime
Definition
darwintimer.h:43
Darwin::DarwinTimer::GetTicks
uint GetTicks() const
get current time in ticks
Definition
darwintimer.cc:142
Darwin::DarwinTimer::Stop
void Stop()
stop the timer
Definition
darwintimer.cc:53
Darwin::DarwinTimer::Start
void Start()
start/continue the timer
Definition
darwintimer.cc:33
Darwin
Definition
darwinsysteminfo.cc:10
Timing::Time
double Time
the time datatype
Definition
time.h:18
time.h
Typedefs for the Timing subsystem.
types.h
uint
unsigned int uint
Definition
types.h:33
code
foundation
timing
darwin
darwintimer.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.