[Box Backup-commit] COMMIT r3130 - box/trunk/lib/common

subversion at boxbackup.org subversion at boxbackup.org
Wed Nov 7 00:02:32 GMT 2012


Author: chris
Date: 2012-11-07 00:02:32 +0000 (Wed, 07 Nov 2012)
New Revision: 3130

Modified:
   box/trunk/lib/common/BoxTime.cpp
Log:
Log the number of nanoseconds left to sleep, otherwise the log messages
don't make sense.


Modified: box/trunk/lib/common/BoxTime.cpp
===================================================================
--- box/trunk/lib/common/BoxTime.cpp	2012-11-06 23:58:14 UTC (rev 3129)
+++ box/trunk/lib/common/BoxTime.cpp	2012-11-07 00:02:32 UTC (rev 3130)
@@ -127,7 +127,7 @@
 		// when nanosleep() returns later than expected.
 
 		int32_t secs = (int32_t) ts.tv_sec;
-		int64_t remain_ns = (secs * 1000000000) + ts.tv_nsec;
+		int64_t remain_ns = ((int64_t)secs * 1000000000) + ts.tv_nsec;
 
 		if (remain_ns < 0)
 		{
@@ -137,9 +137,8 @@
 			return;
 		}
 
-		BOX_TRACE("nanosleep interrupted with " <<
-			(remain_ns / 1000000000) << " secs remaining, "
-			"sleeping again");
+		BOX_TRACE("nanosleep interrupted with " << remain_ns <<
+			" nanosecs remaining, sleeping again");
 	}
 #endif
 }




More information about the Boxbackup-commit mailing list