WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Axionize
Copy link
Contributor

@Axionize Axionize commented Nov 28, 2025

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
Copy link
Contributor Author

Axionize commented Nov 28, 2025

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

@ManInMyVan ManInMyVan self-requested a review November 28, 2025 01:40
@Axionize
Copy link
Contributor Author

Axionize commented Dec 9, 2025

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

@ManInMyVan
Copy link
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