aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/ITimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/include/ITimer.h')
-rw-r--r--libraries/irrlicht-1.8/include/ITimer.h206
1 files changed, 103 insertions, 103 deletions
diff --git a/libraries/irrlicht-1.8/include/ITimer.h b/libraries/irrlicht-1.8/include/ITimer.h
index 815ebd6..610d6fa 100644
--- a/libraries/irrlicht-1.8/include/ITimer.h
+++ b/libraries/irrlicht-1.8/include/ITimer.h
@@ -1,103 +1,103 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __I_TIMER_H_INCLUDED__ 5#ifndef __I_TIMER_H_INCLUDED__
6#define __I_TIMER_H_INCLUDED__ 6#define __I_TIMER_H_INCLUDED__
7 7
8#include "IReferenceCounted.h" 8#include "IReferenceCounted.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12 12
13//! Interface for getting and manipulating the virtual time 13//! Interface for getting and manipulating the virtual time
14class ITimer : public virtual IReferenceCounted 14class ITimer : public virtual IReferenceCounted
15{ 15{
16public: 16public:
17 //! Returns current real time in milliseconds of the system. 17 //! Returns current real time in milliseconds of the system.
18 /** This value does not start with 0 when the application starts. 18 /** This value does not start with 0 when the application starts.
19 For example in one implementation the value returned could be the 19 For example in one implementation the value returned could be the
20 amount of milliseconds which have elapsed since the system was started. 20 amount of milliseconds which have elapsed since the system was started.
21 */ 21 */
22 virtual u32 getRealTime() const = 0; 22 virtual u32 getRealTime() const = 0;
23 23
24 enum EWeekday 24 enum EWeekday
25 { 25 {
26 EWD_SUNDAY=0, 26 EWD_SUNDAY=0,
27 EWD_MONDAY, 27 EWD_MONDAY,
28 EWD_TUESDAY, 28 EWD_TUESDAY,
29 EWD_WEDNESDAY, 29 EWD_WEDNESDAY,
30 EWD_THURSDAY, 30 EWD_THURSDAY,
31 EWD_FRIDAY, 31 EWD_FRIDAY,
32 EWD_SATURDAY 32 EWD_SATURDAY
33 }; 33 };
34 34
35 struct RealTimeDate 35 struct RealTimeDate
36 { 36 {
37 // Hour of the day, from 0 to 23 37 // Hour of the day, from 0 to 23
38 u32 Hour; 38 u32 Hour;
39 // Minute of the hour, from 0 to 59 39 // Minute of the hour, from 0 to 59
40 u32 Minute; 40 u32 Minute;
41 // Second of the minute, due to extra seconds from 0 to 61 41 // Second of the minute, due to extra seconds from 0 to 61
42 u32 Second; 42 u32 Second;
43 // Year of the gregorian calender 43 // Year of the gregorian calender
44 s32 Year; 44 s32 Year;
45 // Month of the year, from 1 to 12 45 // Month of the year, from 1 to 12
46 u32 Month; 46 u32 Month;
47 // Day of the month, from 1 to 31 47 // Day of the month, from 1 to 31
48 u32 Day; 48 u32 Day;
49 // Weekday for the current day 49 // Weekday for the current day
50 EWeekday Weekday; 50 EWeekday Weekday;
51 // Day of the year, from 1 to 366 51 // Day of the year, from 1 to 366
52 u32 Yearday; 52 u32 Yearday;
53 // Whether daylight saving is on 53 // Whether daylight saving is on
54 bool IsDST; 54 bool IsDST;
55 }; 55 };
56 56
57 virtual RealTimeDate getRealTimeAndDate() const = 0; 57 virtual RealTimeDate getRealTimeAndDate() const = 0;
58 58
59 //! Returns current virtual time in milliseconds. 59 //! Returns current virtual time in milliseconds.
60 /** This value starts with 0 and can be manipulated using setTime(), 60 /** This value starts with 0 and can be manipulated using setTime(),
61 stopTimer(), startTimer(), etc. This value depends on the set speed of 61 stopTimer(), startTimer(), etc. This value depends on the set speed of
62 the timer if the timer is stopped, etc. If you need the system time, 62 the timer if the timer is stopped, etc. If you need the system time,
63 use getRealTime() */ 63 use getRealTime() */
64 virtual u32 getTime() const = 0; 64 virtual u32 getTime() const = 0;
65 65
66 //! sets current virtual time 66 //! sets current virtual time
67 virtual void setTime(u32 time) = 0; 67 virtual void setTime(u32 time) = 0;
68 68
69 //! Stops the virtual timer. 69 //! Stops the virtual timer.
70 /** The timer is reference counted, which means everything which calls 70 /** The timer is reference counted, which means everything which calls
71 stop() will also have to call start(), otherwise the timer may not 71 stop() will also have to call start(), otherwise the timer may not
72 start/stop correctly again. */ 72 start/stop correctly again. */
73 virtual void stop() = 0; 73 virtual void stop() = 0;
74 74
75 //! Starts the virtual timer. 75 //! Starts the virtual timer.
76 /** The timer is reference counted, which means everything which calls 76 /** The timer is reference counted, which means everything which calls
77 stop() will also have to call start(), otherwise the timer may not 77 stop() will also have to call start(), otherwise the timer may not
78 start/stop correctly again. */ 78 start/stop correctly again. */
79 virtual void start() = 0; 79 virtual void start() = 0;
80 80
81 //! Sets the speed of the timer 81 //! Sets the speed of the timer
82 /** The speed is the factor with which the time is running faster or 82 /** The speed is the factor with which the time is running faster or
83 slower then the real system time. */ 83 slower then the real system time. */
84 virtual void setSpeed(f32 speed = 1.0f) = 0; 84 virtual void setSpeed(f32 speed = 1.0f) = 0;
85 85
86 //! Returns current speed of the timer 86 //! Returns current speed of the timer
87 /** The speed is the factor with which the time is running faster or 87 /** The speed is the factor with which the time is running faster or
88 slower then the real system time. */ 88 slower then the real system time. */
89 virtual f32 getSpeed() const = 0; 89 virtual f32 getSpeed() const = 0;
90 90
91 //! Returns if the virtual timer is currently stopped 91 //! Returns if the virtual timer is currently stopped
92 virtual bool isStopped() const = 0; 92 virtual bool isStopped() const = 0;
93 93
94 //! Advances the virtual time 94 //! Advances the virtual time
95 /** Makes the virtual timer update the time value based on the real 95 /** Makes the virtual timer update the time value based on the real
96 time. This is called automatically when calling IrrlichtDevice::run(), 96 time. This is called automatically when calling IrrlichtDevice::run(),
97 but you can call it manually if you don't use this method. */ 97 but you can call it manually if you don't use this method. */
98 virtual void tick() = 0; 98 virtual void tick() = 0;
99}; 99};
100 100
101} // end namespace irr 101} // end namespace irr
102 102
103#endif 103#endif