Rename unique_lock variables in `TimedMutex` in order to avoid shadowing
[folly.git] / folly / stop_watch.h
index e16071a38f70dca8b158cefb2004394abc3e9b6f..994af110ad7f43e47d73c82d5df6a28e3bfd7dab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,9 +62,9 @@ using monotonic_clock = std::chrono::steady_clock;
  *
  * Example 1:
  *
- *  coarse_stop_watch<std::seconds> watch;
+ *  coarse_stop_watch<std::chrono::seconds> 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<std::seconds> watch;
+ *  coarse_stop_watch<std::chrono::seconds> watch;
  *  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>
  */
@@ -313,9 +313,9 @@ using coarse_stop_watch = custom_stop_watch<monotonic_coarse_clock, Duration>;
  *
  * Example:
  *
- *  stop_watch<std::seconds> watch;
+ *  stop_watch<std::chrono::seconds> watch;
  *  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>
  */