MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / current_ms

Method current_ms

tests/BS_thread_pool_test.cpp:3436–3439  ·  view source on GitHub ↗

* @brief Get the number of milliseconds that have elapsed since the object was constructed or since `start()` was last called, but keep the timer ticking. * * @return The number of milliseconds. */

Source from the content-addressed store, hash-verified

3434 * @return The number of milliseconds.
3435 */
3436 [[nodiscard]] std::chrono::milliseconds::rep current_ms() const
3437 {
3438 return (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - start_time)).count();
3439 }
3440
3441 /**
3442 * @brief Start (or restart) measuring time. Note that the timer starts ticking as soon as the object is created, so this is only necessary if we want to restart the clock later.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected