wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
stopwatch.h
Go to the documentation of this file.
1#pragma once
2
3#include <wut.h>
4#include "spinlock.h"
5#include "time.h"
6
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct OSStopwatch OSStopwatch;
18
39WUT_CHECK_OFFSET(OSStopwatch, 0x00, lock);
40WUT_CHECK_OFFSET(OSStopwatch, 0x10, name);
41WUT_CHECK_OFFSET(OSStopwatch, 0x14, hitCount);
42WUT_CHECK_OFFSET(OSStopwatch, 0x18, totalTime);
43WUT_CHECK_OFFSET(OSStopwatch, 0x20, minTime);
44WUT_CHECK_OFFSET(OSStopwatch, 0x28, maxTime);
45WUT_CHECK_OFFSET(OSStopwatch, 0x30, startTime);
46WUT_CHECK_OFFSET(OSStopwatch, 0x38, running);
47WUT_CHECK_SIZE(OSStopwatch, 0x40);
48
53void
55 const char *name);
56
60void
62
67void
69
74void
76
82
86void
88
89#ifdef __cplusplus
90}
91#endif
92
OSTime totalTime
Total time from first start to last stop.
Definition stopwatch.h:28
OSTime minTime
Minimum time between stops.
Definition stopwatch.h:30
uint32_t hitCount
Number of times the stopwatch has been stopped.
Definition stopwatch.h:26
BOOL running
Whether the stopwatch is running.
Definition stopwatch.h:36
const char * name
Tag.
Definition stopwatch.h:24
OSSpinLock lock
Lock.
Definition stopwatch.h:22
OSTime maxTime
Maximum time between stops.
Definition stopwatch.h:32
OSTime startTime
Last time the watch was started.
Definition stopwatch.h:34
void OSInitStopwatch(OSStopwatch *stopwatch, const char *name)
Initialises the stopwatch, stopwatches must be initialized before any other stopwatch functions are u...
void OSStartStopwatch(OSStopwatch *stopwatch)
Starts the stopwatch.
void OSStopStopwatch(OSStopwatch *stopwatch)
Stops the stopwatch and increments hit count.
OSTime OSCheckStopwatch(OSStopwatch *stopwatch)
Returns the total time the stopwatch has been running.
void OSDumpStopwatch(OSStopwatch *stopwatch)
Dumps stopwatch info to the Cafe OS warn log.
void OSResetStopwatch(OSStopwatch *stopwatch)
Resets all stopwatch data.
int64_t OSTime
Definition time.h:18
int32_t BOOL
Definition wut_types.h:7