Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84484 - trunk/boost/asio
From: chris_at_[hidden]
Date: 2013-05-25 07:41:20


Author: chris_kohlhoff
Date: 2013-05-25 07:41:19 EDT (Sat, 25 May 2013)
New Revision: 84484
URL: http://svn.boost.org/trac/boost/changeset/84484

Log:
Fix waitable timer documentation. Refs #8602
Text files modified:
   trunk/boost/asio/basic_waitable_timer.hpp | 17 +++++++++--------
   1 files changed, 9 insertions(+), 8 deletions(-)

Modified: trunk/boost/asio/basic_waitable_timer.hpp
==============================================================================
--- trunk/boost/asio/basic_waitable_timer.hpp (original)
+++ trunk/boost/asio/basic_waitable_timer.hpp 2013-05-25 07:41:19 EDT (Sat, 25 May 2013)
@@ -38,7 +38,8 @@
  * If the wait() or async_wait() function is called on an expired timer, the
  * wait operation will complete immediately.
  *
- * Most applications will use the boost::asio::waitable_timer typedef.
+ * Most applications will use one of the boost::asio::steady_timer,
+ * boost::asio::system_timer or boost::asio::high_resolution_timer typedefs.
  *
  * @note This waitable timer functionality is for use with the C++11 standard
  * library's @c <chrono> facility, or with the Boost.Chrono library.
@@ -48,20 +49,20 @@
  * @e Shared @e objects: Unsafe.
  *
  * @par Examples
- * Performing a blocking wait:
+ * Performing a blocking wait (C++11):
  * @code
  * // Construct a timer without setting an expiry time.
- * boost::asio::waitable_timer timer(io_service);
+ * boost::asio::steady_timer timer(io_service);
  *
  * // Set an expiry time relative to now.
- * timer.expires_from_now(boost::posix_time::seconds(5));
+ * timer.expires_from_now(std::chrono::seconds(5));
  *
  * // Wait for the timer to expire.
  * timer.wait();
  * @endcode
  *
  * @par
- * Performing an asynchronous wait:
+ * Performing an asynchronous wait (C++11):
  * @code
  * void handler(const boost::system::error_code& error)
  * {
@@ -74,14 +75,14 @@
  * ...
  *
  * // Construct a timer with an absolute expiry time.
- * boost::asio::waitable_timer timer(io_service,
- * boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
+ * boost::asio::steady_timer timer(io_service,
+ * std::chrono::steady_clock::now() + std::chrono::seconds(60));
  *
  * // Start an asynchronous wait.
  * timer.async_wait(handler);
  * @endcode
  *
- * @par Changing an active waitable_timer's expiry time
+ * @par Changing an active waitable timer's expiry time
  *
  * Changing the expiry time of a timer while there are pending asynchronous
  * waits causes those wait operations to be cancelled. To ensure that the action


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk