From 5b7fc789845937310f3a9952259bfa68448664cc Mon Sep 17 00:00:00 2001 From: Boliu Xu Date: Wed, 18 Oct 2017 19:08:13 -0700 Subject: [PATCH] Fix incorrect example usage in stop_watch Summary: As titled. Reviewed By: yfeldblum Differential Revision: D6087099 fbshipit-source-id: 1c346fa6f65b5ea58e728759905560ae5ad9cc9d --- folly/stop_watch.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/folly/stop_watch.h b/folly/stop_watch.h index dbdafac1..994af110 100644 --- a/folly/stop_watch.h +++ b/folly/stop_watch.h @@ -62,9 +62,9 @@ using monotonic_clock = std::chrono::steady_clock; * * Example 1: * - * coarse_stop_watch watch; + * coarse_stop_watch watch; * do_something(); - * std::cout << "time elapsed: " << watch.elapsed() << std::endl; + * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl; * * auto const ttl = 60_s; * if (watch.elapsed(ttl)) { @@ -293,9 +293,9 @@ struct custom_stop_watch { * * Example: * - * coarse_stop_watch watch; + * coarse_stop_watch watch; * do_something(); - * std::cout << "time elapsed: " << watch.elapsed() << std::endl; + * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl; * * @author: Marcelo Juchem */ @@ -313,9 +313,9 @@ using coarse_stop_watch = custom_stop_watch; * * Example: * - * stop_watch watch; + * stop_watch watch; * do_something(); - * std::cout << "time elapsed: " << watch.elapsed() << std::endl; + * std::cout << "time elapsed: " << watch.elapsed().count() << std::endl; * * @author: Marcelo Juchem */ -- 2.34.1