Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
ITimer.hpp
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 jimcpp/jimcpp.hpp
4
5#ifndef JPP_I_TIMER_HPP_INCLUDED
6#define JPP_I_TIMER_HPP_INCLUDED
7
8#include <jimcpp/core/engine/IReferenceCounted.hpp>
9
10namespace jpp
11{
12
14class ITimer : public virtual IReferenceCounted
15{
16public:
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
36 {
37 public:
38 // Hour of the day, from 0 to 23
39 u32 Hour;
40 // Minute of the hour, from 0 to 59
41 u32 Minute;
42 // Second of the minute, due to extra seconds from 0 to 61
43 u32 Second;
44 // Year of the Gregorian calender
45 s32 Year;
46 // Month of the year, from 1 to 12
47 u32 Month;
48 // Day of the month, from 1 to 31
49 u32 Day;
50 // Weekday for the current day
51 EWeekday Weekday;
52 // Day of the year, from 1 to 366
53 u32 Yearday;
54 // Whether daylight saving is on
55 bool IsDST;
56 };
57
58 virtual RealTimeDate getRealTimeAndDate() const = 0;
59
61
65 virtual u32 getTime() const = 0;
66
68 virtual void setTime(u32 time) = 0;
69
71
74 virtual void stop() = 0;
75
77
80 virtual void start() = 0;
81
83
85 virtual void setSpeed(f32 speed = 1.0f) = 0;
86
88
90 virtual f32 getSpeed() const = 0;
91
93 virtual bool isStopped() const = 0;
94
96
99 virtual void tick() = 0;
100};
101
102} // end namespace jpp
103
104#endif
Base class of most objects of the Jimcpp Engine.
Definition IReferenceCounted.hpp:46
Definition ITimer.hpp:36
Interface for getting and manipulating the virtual time.
Definition ITimer.hpp:15
virtual void tick()=0
Advances the virtual time.
virtual void stop()=0
Stops the virtual timer.
virtual bool isStopped() const =0
Returns if the virtual timer is currently stopped.
virtual u32 getTime() const =0
Returns current virtual time in milliseconds.
virtual void setTime(u32 time)=0
sets current virtual time
virtual void start()=0
Starts the virtual timer.
virtual f32 getSpeed() const =0
Returns current speed of the timer.
virtual u32 getRealTime() const =0
Returns current real time in milliseconds of the system.
virtual void setSpeed(f32 speed=1.0f)=0
Sets the speed of the timer.
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110

Jimcpp    @cppfx.xyz

K