Revision: 6662
http://playerstage.svn.sourceforge.net/playerstage/?rev=6662&view=rev
Author: gerkey
Date: 2008-06-21 10:03:58 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
applied Gil's patch to stop overflow in RealTimeNow
Modified Paths:
--------------
code/stage/branches/stage-ros/libstage/world.cc
Modified: code/stage/branches/stage-ros/libstage/world.cc
===================================================================
--- code/stage/branches/stage-ros/libstage/world.cc 2008-06-21 16:23:09 UTC
(rev 6661)
+++ code/stage/branches/stage-ros/libstage/world.cc 2008-06-21 17:03:58 UTC
(rev 6662)
@@ -325,7 +325,9 @@
struct timeval tv;
gettimeofday( &tv, NULL ); // slow system call: use sparingly
- return( tv.tv_sec*1000000 + tv.tv_usec );
+ // Implicit cast causes overflow
+ //return( tv.tv_sec*1000000 + tv.tv_usec );
+ return( ((stg_usec_t)tv.tv_sec)*1000000 + tv.tv_usec );
}
stg_usec_t StgWorld::RealTimeSinceStart()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit