ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
Wait Class Reference

Provides a mechanism to wait for a specified duration without blocking. More...

#include <Wait.h>

Public Member Functions

 Wait (unsigned long millisToWait)
 Constructor to initialize Wait with a duration.
 
void Reset ()
 Resets the wait timer to start counting again.
 
bool IsFinished ()
 Checks if the specified duration has elapsed.
 

Private Attributes

unsigned long previousMillis
 Stores the last recorded time in milliseconds.
 
unsigned long millisToWait
 Duration to wait in milliseconds.
 

Detailed Description

Provides a mechanism to wait for a specified duration without blocking.

Definition at line 18 of file Wait.h.

Constructor & Destructor Documentation

◆ Wait()

Wait ( unsigned long  millisToWait)

Constructor to initialize Wait with a duration.

Parameters
millisToWaitThe duration to wait in milliseconds.

Definition at line 4 of file Wait.cpp.

References millisToWait.

Member Function Documentation

◆ IsFinished()

bool IsFinished ( )

Checks if the specified duration has elapsed.

Returns
True if the duration has elapsed, otherwise false.

Definition at line 12 of file Wait.cpp.

References millisToWait, and previousMillis.

◆ Reset()

void Reset ( )

Resets the wait timer to start counting again.

Definition at line 8 of file Wait.cpp.

References previousMillis.

Member Data Documentation

◆ millisToWait

unsigned long millisToWait
private

Duration to wait in milliseconds.

Definition at line 21 of file Wait.h.

Referenced by IsFinished(), and Wait().

◆ previousMillis

unsigned long previousMillis
private

Stores the last recorded time in milliseconds.

Definition at line 20 of file Wait.h.

Referenced by IsFinished(), and Reset().


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