#include "timestamp.hxx"
void SGTimeStamp::stamp() {
-#if defined( WIN32 ) && !defined(__CYGWIN__)
+#ifdef _WIN32
unsigned int t;
t = timeGetTime();
_sec = t / 1000;
- _nsec = ( t - ( seconds * 1000 ) ) * 1000 * 1000;
+ _nsec = ( t - ( _sec * 1000 ) ) * 1000 * 1000;
#elif defined(_POSIX_TIMERS) && (0 < _POSIX_TIMERS)
struct timespec ts;
#if defined(_POSIX_MONOTONIC_CLOCK)
#endif
}
+int SGTimeStamp::elapsedMSec() const
+{
+ SGTimeStamp now;
+ now.stamp();
+
+ return static_cast<int>((now - *this).toMSecs());
+}