From: Boliu Xu Date: Thu, 19 Oct 2017 02:08:13 +0000 (-0700) Subject: Fix incorrect example usage in stop_watch X-Git-Tag: v2017.10.23.00~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5b7fc789845937310f3a9952259bfa68448664cc;p=folly.git Fix incorrect example usage in stop_watch Summary: As titled. Reviewed By: yfeldblum Differential Revision: D6087099 fbshipit-source-id: 1c346fa6f65b5ea58e728759905560ae5ad9cc9d --- 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 */