summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Time.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-11-17 20:21:11 +0000
committerMichi Henning <michi@zeroc.com>2005-11-17 20:21:11 +0000
commit5866f5854d24aa77727bf77b0166a85b67b8c492 (patch)
tree719b5ec03f711634e51418d4bdf6171d007cba04 /cpp/src/IceUtil/Time.cpp
parentcorrecting link command so it work son 64 bit as well as it does on 32 bit (diff)
downloadice-5866f5854d24aa77727bf77b0166a85b67b8c492.tar.bz2
ice-5866f5854d24aa77727bf77b0166a85b67b8c492.tar.xz
ice-5866f5854d24aa77727bf77b0166a85b67b8c492.zip
Removed warning from VS 8.
Diffstat (limited to 'cpp/src/IceUtil/Time.cpp')
-rw-r--r--cpp/src/IceUtil/Time.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp
index 09069e9152e..b6ba14ca2e1 100644
--- a/cpp/src/IceUtil/Time.cpp
+++ b/cpp/src/IceUtil/Time.cpp
@@ -28,7 +28,11 @@ IceUtil::Time::now()
{
#ifdef _WIN32
struct _timeb tb;
+# if _MSC_VER >= 1400
+ _ftime_s(&tb);
+# else
_ftime(&tb);
+# endif
return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) +
tb.millitm * 1000);
#else
@@ -109,7 +113,13 @@ IceUtil::Time::toString() const
struct tm* t;
#ifdef _WIN32
+# if _MSC_VER >= 1400
+ struct tm tms;
+ t = &tms;
+ localtime_s(t, &time);
+# else
t = localtime(&time);
+# endif
#else
struct tm tr;
localtime_r(&time, &tr);