Skip to content

New ScopedTimer and small cmake fixes#7

Merged
ChronoInferna merged 2 commits into
mainfrom
dev/timer
Dec 18, 2025
Merged

New ScopedTimer and small cmake fixes#7
ChronoInferna merged 2 commits into
mainfrom
dev/timer

Conversation

@ChronoInferna

Copy link
Copy Markdown
Owner

This pull request improves the timer utilities and build configuration for the project. The main changes include refactoring the Timer and ScopedTimer classes for better usability and safety, updating their implementation, and enhancing the CMake presets to support multiple build types and compilers. Additionally, tests for ScopedTimer are now enabled.

Timer utility improvements:

  • Refactored the Timer and ScopedTimer classes in timer.hpp and timer.cpp to consistently use an internal clock type alias, improved the interface of ScopedTimer to output elapsed time via a reference, and implemented its destructor for automatic timing. [1] [2]
  • Enabled and implemented a test for ScopedTimer in test_timer.cpp, ensuring it correctly measures elapsed time.

Build configuration enhancements:

  • Updated CMakePresets.json to define separate build directories for each preset (e.g., build-debug, build-release, build-clang-debug, etc.), and added a new msvc-debug preset for MSVC builds. This makes it easier to manage and switch between different build configurations. [1] [2] [3]

@ChronoInferna ChronoInferna changed the title feat: ScopedTimer New ScopedTimer and small cmake fixes Dec 18, 2025
@ChronoInferna ChronoInferna merged commit db26469 into main Dec 18, 2025
3 checks passed
@ChronoInferna ChronoInferna deleted the dev/timer branch December 18, 2025 23:42
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.

1 participant