summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Time.h
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-09-05 14:44:03 -0230
committerDwayne Boone <dwayne@zeroc.com>2007-09-05 14:44:03 -0230
commitbdcf4f222f50b915d2dfc0ea3960758adf6937db (patch)
treee263a048b6297395c97e860c87a0ca27b569cb08 /cpp/include/IceUtil/Time.h
parentAdded missing file (diff)
downloadice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.tar.bz2
ice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.tar.xz
ice-bdcf4f222f50b915d2dfc0ea3960758adf6937db.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1351 - use monotonic timers where possible
Diffstat (limited to 'cpp/include/IceUtil/Time.h')
-rw-r--r--cpp/include/IceUtil/Time.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/include/IceUtil/Time.h b/cpp/include/IceUtil/Time.h
index b2b5981776a..60e87501031 100644
--- a/cpp/include/IceUtil/Time.h
+++ b/cpp/include/IceUtil/Time.h
@@ -29,7 +29,8 @@ public:
// automatically generated copy constructor and assignment
// operator do the right thing.
- static Time now();
+ enum Clock { Realtime, Monotonic };
+ static Time now(Clock = Realtime);
static Time seconds(Int64);
static Time milliSeconds(Int64);
static Time microSeconds(Int64);
@@ -194,6 +195,9 @@ private:
Time(Int64);
Int64 _usec;
+#ifdef _WIN32
+ static Int64 _frequency;
+#endif
};
ICE_UTIL_API std::ostream& operator<<(std::ostream&, const Time&);