wavelength 1.0.0
Loading...
Searching...
No Matches
SchedulerClock Class Reference

Clock that runs at a settable rate on the cycles the system clock accumulates. More...

#include <schedulerclock.h>

Public Member Functions

 SchedulerClock (float fMs)
 Construct a stopped clock at a time, at the normal rate.
void Start ()
 Start a stopped clock.
void Stop ()
 Stop a running clock, adding the scaled cycles since the start to the time.
int IsRunning () const
 Report whether the clock runs.
void SetTime (float fMs)
 Set the time, measuring from now.
void SetRate (float fRate)
 Change the rate, keeping the time measured so far.
float GetRate () const
 Report the rate.
float GetTime ()
 Report the time.

Detailed Description

Clock that runs at a settable rate on the cycles the system clock accumulates.

The class is not polymorphic and has no RTTI. The name is inferred from the one owner, Scheduler. The object is 0x18 bytes. The time is kept in system cycles and reported in milliseconds.

Constructor & Destructor Documentation

◆ SchedulerClock()

SchedulerClock::SchedulerClock ( float fMs)
explicit

Construct a stopped clock at a time, at the normal rate.

Parameters
fMsThe time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00282a58
Ghidra address:
PAL: 0x0028c328

Member Function Documentation

◆ Start()

void SchedulerClock::Start ( )

Start a stopped clock.

Ghidra address:
NTSC-U/C: 0x00282aa8
Ghidra address:
PAL: 0x0028c378

◆ Stop()

void SchedulerClock::Stop ( )

Stop a running clock, adding the scaled cycles since the start to the time.

Ghidra address:
NTSC-U/C: 0x00282b08
Ghidra address:
PAL: 0x0028c3d8

◆ IsRunning()

int SchedulerClock::IsRunning ( ) const

Report whether the clock runs.

Returns
Non-zero while the clock runs.
Ghidra address:
NTSC-U/C: 0x00282b98
Ghidra address:
PAL: 0x0028c468

◆ SetTime()

void SchedulerClock::SetTime ( float fMs)

Set the time, measuring from now.

Parameters
fMsThe time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00282ba0
Ghidra address:
PAL: 0x0028c470

◆ SetRate()

void SchedulerClock::SetRate ( float fRate)

Change the rate, keeping the time measured so far.

Parameters
fRateThe rate, 1 for real time.
Ghidra address:
NTSC-U/C: 0x00282c18
Ghidra address:
PAL: 0x0028c4e8

◆ GetRate()

float SchedulerClock::GetRate ( ) const

Report the rate.

Returns
The rate.
Ghidra address:
NTSC-U/C: 0x00282c68
Ghidra address:
PAL: 0x0028c538

◆ GetTime()

float SchedulerClock::GetTime ( )

Report the time.

Returns
The time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00282c70
Ghidra address:
PAL: 0x0028c540

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