-
-
Notifications
You must be signed in to change notification settings - Fork 510
Closed
Labels
discussionThe viability / implementation of the issue is up for debateThe viability / implementation of the issue is up for debatefeatureCode based project improvementCode based project improvement
Description
The class task_timer uses std::chrono::steady_clock. Currently, in the tests the real time has to elapse which makes running the test suite take much longer than it could because of the tests regarding this component.
I propose refactoring task_timer to something like:
template <typename ClockType = std::chrono::steady_clock>
class task_timer {
...
}
This would allow instantiating the task_timer using a mock timer and would allow replacing this_thread::sleep_for(chrono::seconds(4)); with something along the line of timer.advance(4); effectively making all the tests involving timers instant to execute.
fliiiix
Metadata
Metadata
Assignees
Labels
discussionThe viability / implementation of the issue is up for debateThe viability / implementation of the issue is up for debatefeatureCode based project improvementCode based project improvement