[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sptk-commits
Subject:    r1016 - trunk/src/utils
From:       alexey () mail ! total-knowledge ! com
Date:       2009-10-23 11:11:43
Message-ID: courier.000000004AE18F6F.00000584 () mail ! total-knowledge ! com
[Download RAW message or body]

Author: alexey
Date: 2009-10-23 04:11:43 -0700 (Fri, 23 Oct 2009)
New Revision: 1016

Modified:
   trunk/src/utils/CSemaphore.cpp
Log:
Fixed incorrect timeout interval (nanoseconds)

Modified: trunk/src/utils/CSemaphore.cpp
===================================================================
--- trunk/src/utils/CSemaphore.cpp	2009-10-23 06:58:39 UTC (rev 1015)
+++ trunk/src/utils/CSemaphore.cpp	2009-10-23 11:11:43 UTC (rev 1016)
@@ -82,9 +82,9 @@
             throw CException("Error calling clock_gettime()");
 
         abstime.tv_sec += timeoutMS / 1000;
-        abstime.tv_nsec += timeoutMS % 1000 * 1000;
-        if (abstime.tv_nsec >= 1000000) {
-            abstime.tv_nsec = abstime.tv_nsec % 1000000;
+        abstime.tv_nsec += timeoutMS % 1000 * 1000000;
+        if (abstime.tv_nsec >= 1000000000) {
+            abstime.tv_nsec = abstime.tv_nsec % 1000000000;
             abstime.tv_sec++;
         }
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic