-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Labels
enhancementThis issue describes a new feature, improvement, or optimization.This issue describes a new feature, improvement, or optimization.
Milestone
Description
This ticket is based on this discussion. Below are some points to summarize what is being suggested to be done here:
- Merge
OpTimerintoNanoTimesince they have a large overlap in functionality. - Rename
NanoTimeto something else since it doesn't expose nanosecond units at all. Some suggestions are "Stopwatch," "ElapsedTime," or "Timer." - Add a
hasElapsed(Duration)method to make comparisons more efficient and more readable. - Add a
reset()method to make it easier to reuse the object.
Since OpTimer is in the 2.1 branch and only NanoTime is in main and later, it would be beneficial to standardize the usage across these branches. Specifically, after the new Timer class is created, we should:
- Identify places in the 2.1 branch where
NanoTimewould be beneficial but currently can't be used because it doesn't exist in that branch. - Replace
OpTimerwith the newTimerclass in the 2.1 branch. - Ensure the new
Timerclass is used consistently across all branches.
The replacing and consistency steps will be handled in a separate PR after the initial changes are completed.
Metadata
Metadata
Assignees
Labels
enhancementThis issue describes a new feature, improvement, or optimization.This issue describes a new feature, improvement, or optimization.