diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-03-11 20:13:00 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-03-11 20:13:00 +0000 |
commit | 22fbbc24e8558ab9aecda96d441813ed1ffa2feb (patch) | |
tree | 21e8b3d64fac5a85ea3b15ca6cc9d717d851ce37 /ace/High_Res_Timer.i | |
parent | d63b86e31bf88d027a50834fdfe38413c40657e0 (diff) | |
download | ATCD-22fbbc24e8558ab9aecda96d441813ed1ffa2feb.tar.gz |
fixed interpretation of ACE_hrtime_t (nanoseconds) and casts for WIN32
Diffstat (limited to 'ace/High_Res_Timer.i')
-rw-r--r-- | ace/High_Res_Timer.i | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i index f86138b5cbf..4295277e1ce 100644 --- a/ace/High_Res_Timer.i +++ b/ace/High_Res_Timer.i @@ -54,9 +54,9 @@ ACE_INLINE void ACE_High_Res_Timer::elapsed_microseconds (ACE_hrtime_t &usecs) const { if (scale_factor_ > 0) { - usecs = (ACE_hrtime_t) ((this->end_ - this->start_) / scale_factor_) / 1000L; + usecs = (ACE_hrtime_t) ((this->end_ - this->start_) / scale_factor_) / 1000; } else { - usecs = (this->end_ - this->start_) / 1000L; + usecs = (this->end_ - this->start_) / 1000; } } @@ -72,11 +72,11 @@ ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv, double scale_factor) { if (scale_factor > 0) { - tv.sec ((ACE_hrtime_t) (hrt / scale_factor) / 1000000L); - tv.usec ((ACE_hrtime_t) (hrt / scale_factor) % 1000000L); + tv.sec ((long) (hrt / scale_factor / 1000) / 1000000); + tv.usec ((long) (hrt / scale_factor / 1000) % 1000000); } else { - tv.sec (hrt / 1000000L); - tv.usec (hrt % 1000000L); + tv.sec ((long) (hrt / 1000) / 1000000); + tv.usec ((long) (hrt / 1000) % 1000000); } } |