wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Functions
Lock-based Stopwatch
Collaboration diagram for Lock-based Stopwatch:

Data Structures

struct  OSStopwatch
 

Typedefs

typedef struct OSStopwatch OSStopwatch
 

Functions

void OSInitStopwatch (OSStopwatch *stopwatch, const char *name)
 Initialises the stopwatch, stopwatches must be initialized before any other stopwatch functions are used. More...
 
void OSResetStopwatch (OSStopwatch *stopwatch)
 Resets all stopwatch data. More...
 
void OSStartStopwatch (OSStopwatch *stopwatch)
 Starts the stopwatch. More...
 
void OSStopStopwatch (OSStopwatch *stopwatch)
 Stops the stopwatch and increments hit count. More...
 
OSTime OSCheckStopwatch (OSStopwatch *stopwatch)
 Returns the total time the stopwatch has been running. More...
 
void OSDumpStopwatch (OSStopwatch *stopwatch)
 Dumps stopwatch info to the Cafe OS warn log. More...
 

Detailed Description


Data Structure Documentation

◆ OSStopwatch

struct OSStopwatch

Definition at line 19 of file stopwatch.h.

Data Fields
OSSpinLock lock Lock.
const char * name Tag.
uint32_t hitCount Number of times the stopwatch has been stopped.
OSTime totalTime Total time from first start to last stop.
OSTime minTime Minimum time between stops.
OSTime maxTime Maximum time between stops.
OSTime startTime Last time the watch was started.
BOOL running Whether the stopwatch is running.

Typedef Documentation

◆ OSStopwatch

typedef struct OSStopwatch OSStopwatch

Definition at line 1 of file stopwatch.h.

Function Documentation

◆ OSInitStopwatch()

void OSInitStopwatch ( OSStopwatch stopwatch,
const char *  name 
)

Initialises the stopwatch, stopwatches must be initialized before any other stopwatch functions are used.

◆ OSResetStopwatch()

void OSResetStopwatch ( OSStopwatch stopwatch)

Resets all stopwatch data.

◆ OSStartStopwatch()

void OSStartStopwatch ( OSStopwatch stopwatch)

Starts the stopwatch.

if already started, will update the start time without resetting the total time

◆ OSStopStopwatch()

void OSStopStopwatch ( OSStopwatch stopwatch)

Stops the stopwatch and increments hit count.

Nothing happens if the stopwatch has already been stopped

◆ OSCheckStopwatch()

OSTime OSCheckStopwatch ( OSStopwatch stopwatch)

Returns the total time the stopwatch has been running.

◆ OSDumpStopwatch()

void OSDumpStopwatch ( OSStopwatch stopwatch)

Dumps stopwatch info to the Cafe OS warn log.