diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-13 22:33:05 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-13 22:33:05 +0000 |
commit | 49801295f0e8d52390c2713b3c8c264dc714870c (patch) | |
tree | eb127d4b5b519fb0d67713d00d3e523a27dfc3eb /ace/Profile_Timer.cpp | |
parent | 41ee4abd3a5c888abf9a4a86b1cc701fc23aa0e2 (diff) | |
download | ATCD-49801295f0e8d52390c2713b3c8c264dc714870c.tar.gz |
added ACE_LACKS_FLOATING_POINT support
Diffstat (limited to 'ace/Profile_Timer.cpp')
-rw-r--r-- | ace/Profile_Timer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp index 65f8d1fac4d..6e4b1df6f80 100644 --- a/ace/Profile_Timer.cpp +++ b/ace/Profile_Timer.cpp @@ -4,7 +4,7 @@ #include "ace/Profile_Timer.h" #if !defined (__ACE_INLINE__) -#include "ace/Profile_Timer.i" +# include "ace/Profile_Timer.i" #endif /* __ACE_INLINE__ */ ACE_ALLOC_HOOK_DEFINE(ACE_Profile_Timer) @@ -244,7 +244,13 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_hrtime_t delta_t; /* nanoseconds */ timer_.elapsed_time (delta_t); +#if defined (ACE_LACKS_FLOATING_POINT) + // If delta_t isn't large, then et.real_time will be 0. Sorry, no + // floating point. + et.real_time = delta_t / ACE_ONE_SECOND_IN_NSECS; +#else /* ! ACE_LACKS_FLOATING_POINT */ et.real_time = delta_t / (double) ACE_ONE_SECOND_IN_NSECS; +#endif /* ! ACE_LACKS_FLOATING_POINT */ et.user_time = 0; et.system_time = 0; |