]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timedelta.h
Move the time constants to timedelta.h
[libs/core.git] / source / time / timedelta.h
index 972ee26387406d224b11bf3f77f76b4c88fdd296..9be491ecbc762bf02046628274d0e6bb91ba445d 100644 (file)
@@ -53,11 +53,6 @@ public:
        bool operator==(const TimeDelta &t) const { return usec==t.usec; }
        bool operator!=(const TimeDelta &t) const { return usec!=t.usec; }
 
-#ifndef WIN32
-       operator timeval() const { return rawtime_to_timeval(usec); }
-       operator timespec() const { return rawtime_to_timespec(usec); }
-#endif
-
        operator const void *() const { return usec ? this : 0; }
 };
 
@@ -66,6 +61,17 @@ inline TimeDelta operator*(T a, const TimeDelta &t) { return t*a; }
 
 void operator<<(LexicalConverter &, const TimeDelta &);
 
+
+// Constants to be used in creation of TimeDeltas
+extern const TimeDelta zero;
+extern const TimeDelta usec;
+extern const TimeDelta msec;
+extern const TimeDelta sec;
+extern const TimeDelta min;
+extern const TimeDelta hour;
+extern const TimeDelta day;
+extern const TimeDelta week;
+
 } // namespace Time
 } // namespace Msp