Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2007-12-07 03:11:12


Author: anthonyw
Date: 2007-12-07 03:11:11 EST (Fri, 07 Dec 2007)
New Revision: 41819
URL: http://svn.boost.org/trac/boost/changeset/41819

Log:
fixed order of comparison in timeout check
Text files modified:
   trunk/libs/thread/test/test_mutex.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/libs/thread/test/test_mutex.cpp
==============================================================================
--- trunk/libs/thread/test/test_mutex.cpp (original)
+++ trunk/libs/thread/test/test_mutex.cpp 2007-12-07 03:11:11 EST (Fri, 07 Dec 2007)
@@ -138,7 +138,7 @@
 
         boost::system_time now=boost::get_system_time();
         boost::posix_time::milliseconds const timeout_resolution(20);
- BOOST_CHECK((now-timeout_resolution)<timeout);
+ BOOST_CHECK((timeout-timeout_resolution)<now);
 
         // Test the lock, unlock and timedlock methods.
         lock.unlock();


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