Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Irrlicht
Include
ITimer.h
1
// Copyright (C) 2002-2012 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5
#ifndef __I_TIMER_H_INCLUDED__
6
#define __I_TIMER_H_INCLUDED__
7
8
#include "IReferenceCounted.h"
9
10
namespace
irr
11
{
12
14
class
ITimer
:
public
virtual
IReferenceCounted
15
{
16
public
:
18
22
virtual
u32
getRealTime
()
const
= 0;
23
24
enum
EWeekday
25
{
26
EWD_SUNDAY=0,
27
EWD_MONDAY,
28
EWD_TUESDAY,
29
EWD_WEDNESDAY,
30
EWD_THURSDAY,
31
EWD_FRIDAY,
32
EWD_SATURDAY
33
};
34
35
struct
RealTimeDate
36
{
37
// Hour of the day, from 0 to 23
38
u32
Hour;
39
// Minute of the hour, from 0 to 59
40
u32
Minute;
41
// Second of the minute, due to extra seconds from 0 to 61
42
u32
Second;
43
// Year of the gregorian calender
44
s32
Year;
45
// Month of the year, from 1 to 12
46
u32
Month;
47
// Day of the month, from 1 to 31
48
u32
Day;
49
// Weekday for the current day
50
EWeekday Weekday;
51
// Day of the year, from 1 to 366
52
u32
Yearday;
53
// Whether daylight saving is on
54
bool
IsDST;
55
};
56
57
virtual
RealTimeDate
getRealTimeAndDate()
const
= 0;
58
60
64
virtual
u32
getTime
()
const
= 0;
65
67
virtual
void
setTime
(
u32
time) = 0;
68
70
73
virtual
void
stop
() = 0;
74
76
79
virtual
void
start
() = 0;
80
82
84
virtual
void
setSpeed
(
f32
speed = 1.0f) = 0;
85
87
89
virtual
f32
getSpeed
()
const
= 0;
90
92
virtual
bool
isStopped
()
const
= 0;
93
95
98
virtual
void
tick
() = 0;
99
};
100
101
}
// end namespace irr
102
103
#endif
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition
IReferenceCounted.h:50
irr::ITimer
Interface for getting and manipulating the virtual time.
Definition
ITimer.h:15
irr::ITimer::setSpeed
virtual void setSpeed(f32 speed=1.0f)=0
Sets the speed of the timer.
irr::ITimer::tick
virtual void tick()=0
Advances the virtual time.
irr::ITimer::stop
virtual void stop()=0
Stops the virtual timer.
irr::ITimer::getRealTime
virtual u32 getRealTime() const =0
Returns current real time in milliseconds of the system.
irr::ITimer::start
virtual void start()=0
Starts the virtual timer.
irr::ITimer::getTime
virtual u32 getTime() const =0
Returns current virtual time in milliseconds.
irr::ITimer::getSpeed
virtual f32 getSpeed() const =0
Returns current speed of the timer.
irr::ITimer::isStopped
virtual bool isStopped() const =0
Returns if the virtual timer is currently stopped.
irr::ITimer::setTime
virtual void setTime(u32 time)=0
sets current virtual time
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition
Skylicht.h:33
irr::f32
float f32
32 bit floating point variable.
Definition
irrTypes.h:104
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition
irrTypes.h:58
irr::s32
signed int s32
32 bit signed variable.
Definition
irrTypes.h:66
irr::ITimer::RealTimeDate
Definition
ITimer.h:36
Generated by
1.17.0