]> git.mxchange.org Git - simgear.git/blobdiff - simgear/timing/timestamp.hxx
Merge branch 'next' of git://gitorious.org/fg/simgear into next
[simgear.git] / simgear / timing / timestamp.hxx
index 7b417a84de27a7b389141f8c93a6c5c9296210bc..f195dc3740fbdedd4593b2d6c9ff6f574a648494 100644 (file)
@@ -44,7 +44,7 @@
  * level of accuracy).
  *
  * The SGTimeStamp is useful for tracking the elapsed time of various
- * events in your program. You can also use it to keep constistant
+ * events in your program. You can also use it to keep consistent
  * motion across varying frame rates.
  *
  * Note SGTimestamp does not deliver the time of day. The content of this
@@ -59,8 +59,8 @@ public:
 
     /** Default constructor, initialize time to zero. */
     SGTimeStamp() :
-      _sec(0),
-      _nsec(0)
+      _nsec(0),
+      _sec(0)
     { }
 
     /** Hmm, might reenable them at some time, but since it is not clear
@@ -195,6 +195,10 @@ public:
     static SGTimeStamp now()
     { SGTimeStamp ts; ts.stamp(); return ts; }
 
+    /**
+     * elapsed time since the stamp was taken, in msec
+     */
+    int elapsedMSec() const;
 private:
     SGTimeStamp(sec_type sec, nsec_type nsec)
     { setTime(sec, nsec); }