TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
IntervalTimer Struct Reference

#include <Timer.h>

Public Member Functions

 IntervalTimer ()
 
void Update (time_t diff)
 
bool Passed ()
 
void Reset ()
 
void SetCurrent (time_t current)
 
void SetInterval (time_t interval)
 
time_t GetInterval () const
 
time_t GetCurrent () const
 

Private Attributes

time_t _interval
 
time_t _current
 

Constructor & Destructor Documentation

IntervalTimer::IntervalTimer ( )
inline
52  : _interval(0), _current(0)
53  {
54  }
time_t _current
Definition: Timer.h:97
time_t _interval
Definition: Timer.h:96

Member Function Documentation

time_t IntervalTimer::GetCurrent ( ) const
inline
90  {
91  return _current;
92  }
time_t _current
Definition: Timer.h:97

+ Here is the caller graph for this function:

time_t IntervalTimer::GetInterval ( ) const
inline
85  {
86  return _interval;
87  }
time_t _interval
Definition: Timer.h:96

+ Here is the caller graph for this function:

bool IntervalTimer::Passed ( )
inline
64  {
65  return _current >= _interval;
66  }
time_t _current
Definition: Timer.h:97
time_t _interval
Definition: Timer.h:96

+ Here is the caller graph for this function:

void IntervalTimer::Reset ( )
inline
69  {
70  if (_current >= _interval)
72  }
time_t _current
Definition: Timer.h:97
time_t _interval
Definition: Timer.h:96

+ Here is the caller graph for this function:

void IntervalTimer::SetCurrent ( time_t  current)
inline
75  {
76  _current = current;
77  }
time_t _current
Definition: Timer.h:97

+ Here is the caller graph for this function:

void IntervalTimer::SetInterval ( time_t  interval)
inline
80  {
81  _interval = interval;
82  }
time_t _interval
Definition: Timer.h:96

+ Here is the caller graph for this function:

void IntervalTimer::Update ( time_t  diff)
inline
57  {
58  _current += diff;
59  if (_current < 0)
60  _current = 0;
61  }
time_t _current
Definition: Timer.h:97

+ Here is the caller graph for this function:

Member Data Documentation

time_t IntervalTimer::_current
private
time_t IntervalTimer::_interval
private

The documentation for this struct was generated from the following file: