Initialize logging explicitly and read the clock through std::chrono - #153
Draft
gunnarbeutner wants to merge 2 commits into
Draft
Initialize logging explicitly and read the clock through std::chrono#153gunnarbeutner wants to merge 2 commits into
gunnarbeutner wants to merge 2 commits into
Conversation
|
Development builds of 67628bf: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
gunnarbeutner
marked this pull request as draft
September 10, 2026 18:14
gunnarbeutner
force-pushed
the
explicit-logging-init
branch
from
September 10, 2026 18:17
67628bf to
8bd64dc
Compare
gunnarbeutner
force-pushed
the
explicit-logging-init
branch
from
September 10, 2026 18:57
8bd64dc to
bc831d0
Compare
gunnarbeutner
marked this pull request as ready for review
September 10, 2026 18:59
gunnarbeutner
marked this pull request as draft
September 10, 2026 19:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initialize logging explicitly instead of on the first message.
Debug_InittakesargcandargvfromWinMain, which already built them. That also drops a second command line parse. Messages before the call still reach thedebugger and console.
Read the millisecond clock through std::chrono. The timer then needs no initialization at all:
steady_clockreplaces the cycle counter and the multimedia timer fallback, so the class holds no state and logs nothing beforemain. Call sites which require the current time now readSystem_Milliseconds(), which counts from the first reading rather than machine boot; every one of them compares readings, so the origin is not needed anyway.timeGetTime,GetTickCount,timeBeginPeriodandtimeEndPeriodhave no callers left.This also fixes an inverted condition:
timeEndPeriodwas called exactly whentimeBeginPeriodhad not been, and skipped when it had.