Task of a guest that measures the clock of the host.
More...
#include <clocksynctask.h>
|
| | ~ClockSyncTask () override=default |
| | Destroy the object.
|
| void | AddSample (float fRequestTime, float fHostTime) |
| | Note an answer of the host while the task runs, and finish once the answers suffice.
|
| void | FinishSync () |
| | Finish the task and give JoinpadRT the median offset and the mean round trip.
|
| | Task () |
| | Construct an idle task.
|
| virtual | ~Task () |
| | Release the task.
|
| int | Poll () |
| | Report the state after giving a running task one poll.
|
| void | Start () |
| | Enter the running state and call OnStart(), unless the task is already running.
|
| void | Stop () |
| | Call OnStop() when the task is running, and return to the idle state.
|
| void | Finish (bool bSucceeded) |
| | End the task from outside its poll, and call OnStop() when it was running.
|
| int | GetState () const |
| | Report mState.
|
|
| static constexpr int | kRequestInterval = 10 |
| | The polls between two requests.
|
| static constexpr int | kSampleCount = 5 |
| | The answers the task waits for.
|
|
| void | OnStart () override |
| | Forget the answers, and ask at the next poll.
|
| void | OnPoll () override |
| | Ask the host for the time every kRequestInterval polls.
|
| virtual void | OnStop () |
| | Abandon the work.
|
Task of a guest that measures the clock of the host.
The RTTI includes the name and records Task as the base. The vtable is at 0x003d4998, and the object is 0x1c bytes. The task asks the host for the time every kRequestInterval polls and keeps the answers. Once kSampleCount answers arrived, it gives JoinpadRT the median offset of the clocks.
◆ ~ClockSyncTask()
| ClockSyncTask::~ClockSyncTask |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x0039a4b0
- Ghidra address:
- PAL: 0x00408d38
◆ AddSample()
| void ClockSyncTask::AddSample |
( |
float | fRequestTime, |
|
|
float | fHostTime ) |
Note an answer of the host while the task runs, and finish once the answers suffice.
The name is inferred.
- Parameters
-
| fRequestTime | The clock of this console when it asked. |
| fHostTime | The clock of the host when it answered. |
- Ghidra address:
- NTSC-U/C: 0x0025c800
- Ghidra address:
- PAL: 0x00265860
◆ FinishSync()
| void ClockSyncTask::FinishSync |
( |
| ) |
|
Finish the task and give JoinpadRT the median offset and the mean round trip.
The name is inferred.
- Ghidra address:
- NTSC-U/C: 0x0025caa8
- Ghidra address:
- PAL: 0x00265b08
◆ OnStart()
| void ClockSyncTask::OnStart |
( |
| ) |
|
|
overrideprotectedvirtual |
Forget the answers, and ask at the next poll.
- Ghidra address:
- NTSC-U/C: 0x0025c6e8
- Ghidra address:
- PAL: 0x00265748
Reimplemented from Task.
◆ OnPoll()
| void ClockSyncTask::OnPoll |
( |
| ) |
|
|
overrideprotectedvirtual |
Ask the host for the time every kRequestInterval polls.
- Ghidra address:
- NTSC-U/C: 0x0025c728
- Ghidra address:
- PAL: 0x00265788
Reimplemented from Task.
◆ kRequestInterval
| int ClockSyncTask::kRequestInterval = 10 |
|
staticconstexpr |
The polls between two requests.
◆ kSampleCount
| int ClockSyncTask::kSampleCount = 5 |
|
staticconstexpr |
The answers the task waits for.
The documentation for this class was generated from the following file: