Loading...
Searching...
No Matches
ITimer.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_TIMER_H_INCLUDED__
#define __I_TIMER_H_INCLUDED__
#include "IReferenceCounted.h"
namespace irr
{
class ITimer : public virtual IReferenceCounted
{
public:
virtual u32 getRealTime() const = 0;
enum EWeekday
{
EWD_SUNDAY=0,
EWD_MONDAY,
EWD_TUESDAY,
EWD_WEDNESDAY,
EWD_THURSDAY,
EWD_FRIDAY,
EWD_SATURDAY
};
struct RealTimeDate
{
// Hour of the day, from 0 to 23
u32 Hour;
// Minute of the hour, from 0 to 59
u32 Minute;
// Second of the minute, due to extra seconds from 0 to 61
u32 Second;
// Year of the gregorian calender
s32 Year;
// Month of the year, from 1 to 12
u32 Month;
// Day of the month, from 1 to 31
u32 Day;
// Weekday for the current day
EWeekday Weekday;
// Day of the year, from 1 to 366
u32 Yearday;
// Whether daylight saving is on
bool IsDST;
};
virtual RealTimeDate getRealTimeAndDate() const = 0;
virtual u32 getTime() const = 0;
virtual void setTime(u32 time) = 0;
virtual void stop() = 0;
virtual void start() = 0;
virtual void setSpeed(f32 speed = 1.0f) = 0;
virtual f32 getSpeed() const = 0;
virtual bool isStopped() const = 0;
virtual void tick() = 0;
};
} // end namespace irr
#endif
IReferenceCounted.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
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::getRealTimeAndDate
virtual RealTimeDate getRealTimeAndDate() const =0
irr::ITimer::EWeekday
EWeekday
Definition ITimer.h:25
irr::ITimer::EWD_TUESDAY
@ EWD_TUESDAY
Definition ITimer.h:28
irr::ITimer::EWD_SUNDAY
@ EWD_SUNDAY
Definition ITimer.h:26
irr::ITimer::EWD_SATURDAY
@ EWD_SATURDAY
Definition ITimer.h:32
irr::ITimer::EWD_MONDAY
@ EWD_MONDAY
Definition ITimer.h:27
irr::ITimer::EWD_THURSDAY
@ EWD_THURSDAY
Definition ITimer.h:30
irr::ITimer::EWD_FRIDAY
@ EWD_FRIDAY
Definition ITimer.h:31
irr::ITimer::EWD_WEDNESDAY
@ EWD_WEDNESDAY
Definition ITimer.h:29
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 aabbox3d.h:13
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
irr::ITimer::RealTimeDate::IsDST
bool IsDST
Definition ITimer.h:54
irr::ITimer::RealTimeDate::Month
u32 Month
Definition ITimer.h:46
irr::ITimer::RealTimeDate::Weekday
EWeekday Weekday
Definition ITimer.h:50
irr::ITimer::RealTimeDate::Minute
u32 Minute
Definition ITimer.h:40
irr::ITimer::RealTimeDate::Hour
u32 Hour
Definition ITimer.h:38
irr::ITimer::RealTimeDate::Yearday
u32 Yearday
Definition ITimer.h:52
irr::ITimer::RealTimeDate::Year
s32 Year
Definition ITimer.h:44
irr::ITimer::RealTimeDate::Day
u32 Day
Definition ITimer.h:48
irr::ITimer::RealTimeDate::Second
u32 Second
Definition ITimer.h:42
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0