Commit 5b7fc789 authored by Boliu Xu's avatar Boliu Xu Committed by Facebook Github Bot

Fix incorrect example usage in stop_watch

Summary: As titled.

Reviewed By: yfeldblum

Differential Revision: D6087099

fbshipit-source-id: 1c346fa6f65b5ea58e728759905560ae5ad9cc9d
parent e5b4d8b8
...@@ -62,9 +62,9 @@ using monotonic_clock = std::chrono::steady_clock; ...@@ -62,9 +62,9 @@ using monotonic_clock = std::chrono::steady_clock;
* *
* Example 1: * Example 1:
* *
* coarse_stop_watch<std::seconds> watch; * coarse_stop_watch<std::chrono::seconds> watch;
* do_something(); * do_something();
* std::cout << "time elapsed: " << watch.elapsed() << std::endl; * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;
* *
* auto const ttl = 60_s; * auto const ttl = 60_s;
* if (watch.elapsed(ttl)) { * if (watch.elapsed(ttl)) {
...@@ -293,9 +293,9 @@ struct custom_stop_watch { ...@@ -293,9 +293,9 @@ struct custom_stop_watch {
* *
* Example: * Example:
* *
* coarse_stop_watch<std::seconds> watch; * coarse_stop_watch<std::chrono::seconds> watch;
* do_something(); * do_something();
* std::cout << "time elapsed: " << watch.elapsed() << std::endl; * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;
* *
* @author: Marcelo Juchem <marcelo@fb.com> * @author: Marcelo Juchem <marcelo@fb.com>
*/ */
...@@ -313,9 +313,9 @@ using coarse_stop_watch = custom_stop_watch<monotonic_coarse_clock, Duration>; ...@@ -313,9 +313,9 @@ using coarse_stop_watch = custom_stop_watch<monotonic_coarse_clock, Duration>;
* *
* Example: * Example:
* *
* stop_watch<std::seconds> watch; * stop_watch<std::chrono::seconds> watch;
* do_something(); * do_something();
* std::cout << "time elapsed: " << watch.elapsed() << std::endl; * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;
* *
* @author: Marcelo Juchem <marcelo@fb.com> * @author: Marcelo Juchem <marcelo@fb.com>
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment