folly::coarse_stop_watch

A type alias for custom_stop_watch that uses a coarse monotonic clock as the time source. Refer to the documentation of custom_stop_watch for full documentation.

Synopsis

Declared in <folly/stop_watch.h>

template<typename Duration = folly::chrono::coarse_steady_clock::duration>
using coarse_stop_watch = custom_stop_watch<folly::chrono::coarse_steady_clock, Duration>;

Description

Arguments:

  • Duration: (optional) the duration to use when reporting elapsed time. Defaults to the clock's duration.

Example:

coarse_stop_watch<std::chrono::seconds> watch; do_something(); std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;