Skip to content

feat: add breakpoint-tolerant clock system and refactor GrimPlayer time handling - #2377

Open
Axionize wants to merge 1 commit into
GrimAnticheat:2.0from
Axionize:2.0-debug-clock
Open

feat: add breakpoint-tolerant clock system and refactor GrimPlayer time handling#2377
Axionize wants to merge 1 commit into
GrimAnticheat:2.0from
Axionize:2.0-debug-clock

Conversation

@Axionize

@Axionize Axionize commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

This commit Implement zero-cost breakpoint-tolerant time tracking.

It introduces a new time architecture for GrimPlayer that allows developers to pause execution at breakpoints without triggering Timer, FastBreak, or Velocity violations upon resumption.

Changes:

  • Refactored GrimPlayer to use nano()/now() overrides instead of direct System calls.
  • Added DebugGrimPlayer subclass which uses ThreadLocal to track intra-packet execution time.
  • Logic automatically absorbs execution pauses >200ms (breakpoints) while correctly preserving inter-packet delays (server lag/AFK).
  • Added processingPacket() hooks to the Packet Dispatcher and Tick Manager to manage thread-local timers.
  • Performance impact is 0 in production due to JIT monomorphic inlining and dead code elimination of the base class methods.

…me handling

This commit Implement zero-cost breakpoint-tolerant time tracking.

It introduces a new time architecture for GrimPlayer that allows developers to pause execution at breakpoints without triggering Timer, FastBreak, or Velocity violations upon resumption.

Changes:
- Refactored `GrimPlayer` to use `nano()`/`now()` overrides instead of direct System calls.
- Added `DebugGrimPlayer` subclass which uses `ThreadLocal` to track intra-packet execution time.
- Logic automatically absorbs execution pauses >200ms (breakpoints) while correctly preserving inter-packet delays (server lag/AFK).
- Added `processingPacket()` hooks to the Packet Dispatcher and Tick Manager to manage thread-local timers.
- Performance impact is 0 in production due to JIT monomorphic inlining and dead code elimination of the base class methods.
@Axionize Axionize changed the title feat: add breakpoint-tolerant clock system and refactor GrimPlayer ti… feat: add breakpoint-tolerant clock system and refactor GrimPlayer time handling Nov 28, 2025
@Axionize

Axionize commented Nov 28, 2025

Copy link
Copy Markdown
Contributor Author

@ManInMyVan @AoElite @SamB440 can I get a review?

@ManInMyVan
ManInMyVan self-requested a review November 28, 2025 01:40
@Axionize

Axionize commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

@ManInMyVan when are you going to have time to take a look?

@ManInMyVan

Copy link
Copy Markdown
Contributor

@ManInMyVan when are you going to have time to take a look?

no clue

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