TimerManager Class Reference
#include <TimerManager.h>
![](../class_timer_manager.png)
# Public Member Functions | |
void | reset () |
Reset the manager's state. | |
void | frameStarted (uint32 elapsedMicroseconds) |
# Private Attributes | |
uint32 | elapsedMilliseconds |
Elapsed milliseconds since the last call to reset. | |
uint32 | elapsedMicroseconds |
Elapsed microseconds. | |
uint32 | totalElapsedMilliseconds |
Elapsed milliseconds since the start of the program. | |
uint16 | resolution |
Timer's resolution. | |
uint16 | interruptsPerSecond |
Interrupts during the last secoond. | |
uint16 | interruptsPerGameFrame |
Interrupts during the last game frame. | |
uint32 | elapsedMicrosecondsPerInterrupt |
Elapsed microseconds per interrupt. | |
uint16 | targetTimePerInterrupt |
Target elapsed time per interrupt. | |
uint16 | targetTimePerInterrupttUnits |
Units of the target time per interrupt. | |
uint8 | tcrValue |
Last written value to the TCR registry. | |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
# Detailed Description
Class TimerManager
Inherits from Object
Manages rumble effects.
Definition at line 70 of file TimerManager.h.
# Member Function Documentation
# applySettings()
|
static |
Apply the settings to the hardware timer.
- Parameters
-
enable If true, the hardware timer is enabled
Definition at line 98 of file TimerManager.c.
# configure()
|
static |
Configure the timer with the provided arguments.
- Parameters
-
timerResolution Timer's resolution (__TIMER_100US or __TIMER_20US) targetTimePerInterrupt Target elapsed time between timer interrupts targetTimePerInterrupttUnits Timer interrupt's target time units
Definition at line 88 of file TimerManager.c.
# disable()
|
static |
Disable the timer.
Definition at line 124 of file TimerManager.c.
# enable()
|
static |
Enable the timer.
Definition at line 113 of file TimerManager.c.
# frameStarted()
secure void TimerManager::frameStarted | ( | uint32 | elapsedMicroseconds | ) |
Call when the next frame starts.
- Parameters
-
elapsedMicroseconds Elapsed microseconds between calls
Definition at line 584 of file TimerManager.c.
# getCurrentTimerCounter()
|
static |
Retrieve the current timer counter.
- Returns
- Current timer counter
Definition at line 398 of file TimerManager.c.
# getElapsedMilliseconds()
|
static |
Retrieve elapsed milliseconds since the last call to reset.
- Returns
- Elapsed milliseconds since the last call to reset
Definition at line 426 of file TimerManager.c.
# getMinimumTimePerInterruptStep()
|
static |
Retrieve the minimum timer per interrupt step.
- Returns
- Minimum timer per interrupt step
Definition at line 405 of file TimerManager.c.
# getResolution()
|
static |
Retrieve the timer's resolution.
- Returns
- Timer's resolution
Definition at line 214 of file TimerManager.c.
# getResolutionInUS()
|
static |
Retrieve the timer's resolution in microseconds.
- Returns
- Timer's resolution in microseconds
Definition at line 223 of file TimerManager.c.
# getTargetTimePerInterrupt()
|
static |
Retrieve the target time between interrupt calls.
- Returns
- Target time between interrupt calls
Definition at line 294 of file TimerManager.c.
# getTargetTimePerInterruptInMS()
|
static |
Retrieve the target time in milliseconds between interrupt calls.
- Returns
- Target time in milliseconds between interrupt calls
Definition at line 303 of file TimerManager.c.
# getTargetTimePerInterruptInUS()
|
static |
Retrieve the target time in microseconds between interrupt calls.
- Returns
- Target time in microseconds between interrupt calls
Definition at line 330 of file TimerManager.c.
# getTargetTimePerInterruptUnits()
|
static |
Retrieve the target time units between interrupt calls.
- Returns
- Target time units between interrupt calls
Definition at line 380 of file TimerManager.c.
# getTimerCounter()
|
static |
Retrieve the configured timer counter.
- Returns
- Configured timer counter
Definition at line 389 of file TimerManager.c.
# getTotalElapsedMilliseconds()
|
static |
Retrieve elapsed milliseconds since the start of the program.
- Returns
- Elapsed milliseconds since the start of the program
Definition at line 435 of file TimerManager.c.
# interruptHandler()
|
static |
Interrupt handler for timer's interrupts.
Definition at line 40 of file TimerManager.c.
# print()
Print the manager's configuration.
- Parameters
-
x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 494 of file TimerManager.c.
# printInterruptStats()
|
static |
Print the stats related to the interrupts.
- Parameters
-
x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 545 of file TimerManager.c.
# repeatMethodCall()
|
static |
Call a method on the provided scope a numer of time during a lapse of time.
- Parameters
-
callTimes Number of calls to produce during the total duration duration Time that must take the callTimes object Called method's scope method Method to call
Definition at line 464 of file TimerManager.c.
# reset()
secure void TimerManager::reset | ( | ) |
Reset the manager's state.
Definition at line 570 of file TimerManager.c.
# resetTimerCounter()
|
static |
Reset timer's counter.
Definition at line 135 of file TimerManager.c.
# setResolution()
|
static |
Set the timer's resolution.
- Parameters
-
resolution __TIMER_20US or __TIMER_100US
Definition at line 160 of file TimerManager.c.
# setTargetTimePerInterrupt()
|
static |
Set the target time between interrupt calls.
- Parameters
-
targetTimePerInterrupt Target time between interrupt calls
Definition at line 251 of file TimerManager.c.
# setTargetTimePerInterruptUnits()
|
static |
Set the target time units between interrupt calls.
- Parameters
-
targetTimePerInterrupttUnits Target time units between interrupt calls
Definition at line 357 of file TimerManager.c.
# wait()
|
static |
Halt the program by the provided time.
- Parameters
-
milliseconds Time to halt the program
Definition at line 444 of file TimerManager.c.
# Member Data Documentation
# elapsedMicroseconds
|
private |
Elapsed microseconds.
Definition at line 76 of file TimerManager.h.
# elapsedMicrosecondsPerInterrupt
|
private |
Elapsed microseconds per interrupt.
Definition at line 91 of file TimerManager.h.
# elapsedMilliseconds
|
private |
Elapsed milliseconds since the last call to reset.
Definition at line 73 of file TimerManager.h.
# interruptsPerGameFrame
|
private |
Interrupts during the last game frame.
Definition at line 88 of file TimerManager.h.
# interruptsPerSecond
|
private |
Interrupts during the last secoond.
Definition at line 85 of file TimerManager.h.
# resolution
|
private |
Timer's resolution.
Definition at line 82 of file TimerManager.h.
# targetTimePerInterrupt
|
private |
Target elapsed time per interrupt.
Definition at line 94 of file TimerManager.h.
# targetTimePerInterrupttUnits
|
private |
Units of the target time per interrupt.
Definition at line 97 of file TimerManager.h.
# tcrValue
|
private |
Last written value to the TCR registry.
Definition at line 100 of file TimerManager.h.
# totalElapsedMilliseconds
|
private |
Elapsed milliseconds since the start of the program.
Definition at line 79 of file TimerManager.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Hardware/TimerManager.h
- VUEngine-Core/source/Hardware/TimerManager.c