|
wavelength 1.0.0
|
Clock the scheduler reads its due times from, in nanoseconds. More...
#include <systemtime.h>
Public Member Functions | |
| SystemTime () | |
| long long | Now () |
| Read the clock. | |
| void | Mark (long long nNanoseconds) |
| Record a reference reading for the next comparison. | |
| void | Pause () |
| Stop the clock, remembering how far it had run. | |
| void | Resume () |
| Restart a stopped clock from where it stopped. | |
| void | Advance (int nAmount) |
| Stop the clock and move its paused running time forward. | |
Clock the scheduler reads its due times from, in nanoseconds.
The class is not polymorphic and has no RTTI. Its name comes from the debugging symbols of the North American demo release. The demo's Pause() and Resume() have the same instructions as this class's Pause() and Resume(). Only the member this reconstruction reads is recovered; the rest of the 0x28-byte layout is recorded as unknown words to preserve the offsets.
The clock's own reading is in milliseconds and Now() returns nanoseconds. The scale is not a mystery constant: it is the double at 0x008263f8 divided by the 1000 that 0x00466360 returns, which is one million nanoseconds to the millisecond.
mOriginMs is public because MainLoop::Poll() reads it directly and the image has no accessor for it. It sits amid unrecovered words, so the members below are grouped by access rather than by offset, and each trailing comment records the real offset.
| Sch::SystemTime::SystemTime | ( | ) |
| long long Sch::SystemTime::Now | ( | ) |
Read the clock.
| void Sch::SystemTime::Mark | ( | long long | nNanoseconds | ) |
Record a reference reading for the next comparison.
| nNanoseconds | The reading to record. |
| void Sch::SystemTime::Pause | ( | ) |
Stop the clock, remembering how far it had run.
Does nothing while the clock is already stopped. GameManagerImpl's pause handler is the caller. The title is inferred.
| void Sch::SystemTime::Resume | ( | ) |
Restart a stopped clock from where it stopped.
Moves mStartMs so that the elapsed time excludes the pause. Does nothing while the clock is running. GameManagerImpl's unpause handler is the caller. The title is inferred.
| void Sch::SystemTime::Advance | ( | int | nAmount | ) |
Stop the clock and move its paused running time forward.
Pause() is inlined first. The running time then grows by nAmount times one million divided by mNsPerUnit. HxScript::Clock() is the caller. The title is inferred.
| nAmount | The amount to advance by. |