OpenTTD Source  12.0-beta2
GUITimer Class Reference

Public Member Functions

 GUITimer (uint interval)
 
bool HasElapsed () const
 
void SetInterval (uint interval)
 
uint CountElapsed (uint delta)
 Count how many times the interval has elapsed. More...
 
bool Elapsed (uint delta)
 Test if a timer has elapsed. More...
 

Protected Attributes

uint timer
 
uint interval
 

Detailed Description

Definition at line 13 of file guitimer_func.h.

Member Function Documentation

◆ CountElapsed()

uint GUITimer::CountElapsed ( uint  delta)
inline

Count how many times the interval has elapsed.

Use to ensure a specific amount of events happen within a timeframe, e.g. for animation.

Parameters
deltaTime since last test.
Returns
Number of times the interval has elapsed.

Definition at line 40 of file guitimer_func.h.

Referenced by Elapsed(), StatusBarWindow::OnRealtimeTick(), IConsoleWindow::OnRealtimeTick(), ErrmsgWindow::OnRealtimeTick(), AboutWindow::OnRealtimeTick(), and NewsWindow::OnRealtimeTick().

◆ Elapsed()

bool GUITimer::Elapsed ( uint  delta)
inline

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