AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
TimeTracker Struct Reference

#include "Timer.h"

Public Member Functions

 TimeTracker (time_t expiry)
 
void Update (time_t diff)
 
bool Passed () const
 
void Reset (time_t interval)
 
time_t GetExpiry () const
 

Private Attributes

time_t i_expiryTime
 

Detailed Description

Constructor & Destructor Documentation

◆ TimeTracker()

TimeTracker::TimeTracker ( time_t  expiry)
inline
203 : i_expiryTime(expiry)
204 {
205 }
time_t i_expiryTime
Definition: Timer.h:228

Member Function Documentation

◆ GetExpiry()

time_t TimeTracker::GetExpiry ( ) const
inline
223 {
224 return i_expiryTime;
225 }

References i_expiryTime.

◆ Passed()

bool TimeTracker::Passed ( ) const
inline
213 {
214 return i_expiryTime <= 0;
215 }

References i_expiryTime.

Referenced by TimedFleeingMovementGenerator::Update().

◆ Reset()

void TimeTracker::Reset ( time_t  interval)
inline
218 {
219 i_expiryTime = interval;
220 }

References i_expiryTime.

◆ Update()

void TimeTracker::Update ( time_t  diff)
inline
208 {
209 i_expiryTime -= diff;
210 }

References i_expiryTime.

Referenced by TimedFleeingMovementGenerator::Update().

Member Data Documentation

◆ i_expiryTime

time_t TimeTracker::i_expiryTime
private

Referenced by GetExpiry(), Passed(), Reset(), and Update().