summaryrefslogtreecommitdiff
path: root/ace/Date_Time.i
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2002-11-14 07:01:20 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2002-11-14 07:01:20 +0000
commit507e9a122ea8cf7b13d3eeae5704c1558fceea6e (patch)
treeb925040a7eaa7ea9909c9256be5cd2bdccda6957 /ace/Date_Time.i
parent538bf66dbb1ed1e42f3dca9ee8dbd6e8fb43d13b (diff)
downloadATCD-507e9a122ea8cf7b13d3eeae5704c1558fceea6e.tar.gz
ChangeLogTag: Thu Nov 14 06:57:12 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ace/Date_Time.i')
-rw-r--r--ace/Date_Time.i11
1 files changed, 8 insertions, 3 deletions
diff --git a/ace/Date_Time.i b/ace/Date_Time.i
index 0edd4d5ba02..9678fbc0081 100644
--- a/ace/Date_Time.i
+++ b/ace/Date_Time.i
@@ -8,8 +8,13 @@ ACE_Date_Time::update (void)
{
ACE_TRACE ("ACE_Date_Time::update");
- ACE_Time_Value now = ACE_OS::gettimeofday ();
- time_t time = now.sec ();
+ update(ACE_OS::gettimeofday ());
+}
+
+ASYS_INLINE void
+ACE_Date_Time::update (const ACE_Time_Value& timevalue)
+{
+ time_t time = timevalue.sec ();
struct tm tm_time;
ACE_OS::localtime_r (&time, &tm_time);
this->day_ = tm_time.tm_mday;
@@ -18,7 +23,7 @@ ACE_Date_Time::update (void)
this->hour_ = tm_time.tm_hour;
this->minute_ = tm_time.tm_min;
this->second_ = tm_time.tm_sec;
- this->microsec_ = now.usec ();
+ this->microsec_ = timevalue.usec ();
this->wday_ = tm_time.tm_wday;
}