Skip to content

Implement Timing Support - #123

Merged
ergo720 merged 1 commit into
Cxbx-Reloaded:masterfrom
RadWolfie:impl-timing-support
Aug 19, 2026
Merged

Implement Timing Support#123
ergo720 merged 1 commit into
Cxbx-Reloaded:masterfrom
RadWolfie:impl-timing-support

Conversation

@RadWolfie

@RadWolfie RadWolfie commented Aug 18, 2026

Copy link
Copy Markdown
Member

I added support for a disable-timing config option to the config.txt file (which currently defaults to OFF). With timing log output enabled for each API's tests, we will know how long they took.

Here is a working example to see it in action:

with verbose:

327 - XeLoadSection: Tests completed in 162.254 seconds

without verbose:

327 - XeLoadSection: Tests completed in 1.048 seconds

Developers or testers can disable timing output by setting disable-timing=1 in the config.txt file. If a developer hasn't implemented KeQueryPerformanceFrequency and KeQueryPerformanceCounter APIs in their kernel, it is recommended to disable timing through config file or implement those APIs.

@RadWolfie
RadWolfie force-pushed the impl-timing-support branch from 8da9b4e to 4018093 Compare August 18, 2026 21:11
@ergo720

ergo720 commented Aug 19, 2026

Copy link
Copy Markdown
Member

If a developer hasn't implemented KeQueryPerformanceFrequency and KeQueryPerformanceCounter APIs in their kernel, it is recommended to disable timing through config file or implement those APIs.

You can use QueryPerformanceCounter and QueryPerformanceFrequency provided by nxdk to avoid that problem. Also, they are better anyway, since this PR has updated them to use RDTSC instead of KeQueryPerformanceCounter, which provides higher resolutions for timestamps (RDTSC uses the CPU frequency of 733 MHz vs KeQueryPerformanceCounter uses the ACPI frequency of 3.375 MHz).

@RadWolfie
RadWolfie force-pushed the impl-timing-support branch from 4018093 to 8f7afe9 Compare August 19, 2026 15:58
@RadWolfie
RadWolfie force-pushed the impl-timing-support branch from 8f7afe9 to 89194a4 Compare August 19, 2026 18:25
@ergo720
ergo720 merged commit 258a916 into Cxbx-Reloaded:master Aug 19, 2026
1 check passed
@RadWolfie
RadWolfie deleted the impl-timing-support branch August 19, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants