]> git.mxchange.org Git - simgear.git/blobdiff - simgear/timing/timestamp.cxx
Merge branch 'next' of git://gitorious.org/fg/simgear into next
[simgear.git] / simgear / timing / timestamp.cxx
index 7f7773f490174a7d1587e7ba990b450524428772..83eff2fc10ea485c8039634132b958f1ac866cef 100644 (file)
@@ -59,7 +59,7 @@
 #include "timestamp.hxx"
 
 void SGTimeStamp::stamp() {
-#if defined( WIN32 ) && !defined(__CYGWIN__)
+#ifdef _WIN32
     unsigned int t;
     t = timeGetTime();
     _sec = t / 1000;
@@ -104,3 +104,10 @@ void SGTimeStamp::stamp() {
 #endif
 }
 
+int SGTimeStamp::elapsedMSec() const
+{
+    SGTimeStamp now;
+    now.stamp();
+    
+    return static_cast<int>((now - *this).toMSecs());
+}