Skip to content

feat(timer): implement high-resolution timer with RF2.1 microsecond p…#20

Merged
LyeZinho merged 1 commit intomainfrom
9-high-resolution-timer
Apr 14, 2026
Merged

feat(timer): implement high-resolution timer with RF2.1 microsecond p…#20
LyeZinho merged 1 commit intomainfrom
9-high-resolution-timer

Conversation

@LyeZinho
Copy link
Copy Markdown
Member

…recision

  • Add TimePoint struct for tick-based time representation
  • Add Duration struct with conversion methods (ms/us/ns)
  • Implement Timer class with start/stop/reset/elapsed/tick methods
  • Implement ScopeTimer RAII wrapper for profiler integration
  • Add comprehensive TDD test suite (31 tests, all passing)
  • Support both running state tracking and accumulated time calculation
  • Use std::chrono::high_resolution_clock as foundation
  • Update CMakeLists to include Timer implementation and tests

Tests verify:

  • TimePoint comparison and arithmetic
  • Duration conversion accuracy (microsecond precision)
  • Timer lifecycle (start/stop/reset cycles)
  • Tick accumulation for frame timing
  • ScopeTimer RAII semantics

…recision

- Add TimePoint struct for tick-based time representation
- Add Duration struct with conversion methods (ms/us/ns)
- Implement Timer class with start/stop/reset/elapsed/tick methods
- Implement ScopeTimer RAII wrapper for profiler integration
- Add comprehensive TDD test suite (31 tests, all passing)
- Support both running state tracking and accumulated time calculation
- Use std::chrono::high_resolution_clock as foundation
- Update CMakeLists to include Timer implementation and tests

Tests verify:
- TimePoint comparison and arithmetic
- Duration conversion accuracy (microsecond precision)
- Timer lifecycle (start/stop/reset cycles)
- Tick accumulation for frame timing
- ScopeTimer RAII semantics
@LyeZinho LyeZinho linked an issue Apr 14, 2026 that may be closed by this pull request
@LyeZinho LyeZinho merged commit 66a91d1 into main Apr 14, 2026
1 check passed
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.

High-Resolution Timer

1 participant