diff options
author | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-02 16:19:02 +0000 |
---|---|---|
committer | oci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-02 16:19:02 +0000 |
commit | 7b823b177187f3696e69b55d2ca34a15c4da7bcc (patch) | |
tree | 510f6b6e3a43122d59d363baf5bc1fb146916715 /ace/Profile_Timer.cpp | |
parent | 8fe156437504b3fb8ea007919284d5ec497e0484 (diff) | |
download | ATCD-7b823b177187f3696e69b55d2ca34a15c4da7bcc.tar.gz |
ChangeLogTag: Mon Jul 2 11:17:37 2001 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'ace/Profile_Timer.cpp')
-rw-r--r-- | ace/Profile_Timer.cpp | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp index 1ffbea072a9..80f5b2155ce 100644 --- a/ace/Profile_Timer.cpp +++ b/ace/Profile_Timer.cpp @@ -157,7 +157,7 @@ void ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) { ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage"); -# if !defined (ACE_WIN32) && !defined (ACE_HAS_LIMITED_RUSAGE_T) +# if !defined (ACE_HAS_LIMITED_RUSAGE_T) // integral shared memory size usage.ru_ixrss = this->end_usage_.ru_ixrss - this->last_usage_.ru_ixrss; @@ -205,7 +205,7 @@ ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) this->last_usage_.ru_stime); # else ACE_UNUSED_ARG(usage); -# endif /* ACE_WIN32 */ +# endif /* ACE_HAS_LIMITED_RUSAGE_T */ } void @@ -213,19 +213,6 @@ ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et) { ACE_TRACE ("ACE_Profile_Timer::compute_times"); -# if defined (ACE_WIN32) - ACE_Time_Value atv = this->end_time_ - this->begin_time_; - et.real_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS; - - atv = ACE_Time_Value (this->end_usage_.ru_utime) - - ACE_Time_Value (this->begin_usage_.ru_utime); - - et.user_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS; - - atv = ACE_Time_Value (this->end_usage_.ru_stime) - - ACE_Time_Value (this->begin_usage_.ru_stime); - et.system_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS; -# else timeval td; this->subtract (td, this->end_time_, this->begin_time_); @@ -236,7 +223,6 @@ ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et) this->subtract (td, this->end_usage_.ru_stime, this->begin_usage_.ru_stime); et.system_time = td.tv_sec + ((double) td.tv_usec) / ACE_ONE_SECOND_IN_USECS; -# endif /* ACE_WIN32 */ } // Determine the difference between T1 and T2. @@ -302,11 +288,11 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_hrtime_t delta_t; // nanoseconds timer_.elapsed_time (delta_t); -#if !defined (ghs) - et.real_time = (__int64) delta_t / (double) ACE_ONE_SECOND_IN_NSECS; -#else +# if defined (ghs) et.real_time = delta_t / (double) ACE_ONE_SECOND_IN_NSECS; -#endif +# else + et.real_time = (__int64) delta_t / (double) ACE_ONE_SECOND_IN_NSECS; +# endif /* ghs */ # if defined (ACE_HAS_GETRUSAGE) ACE_Time_Value atv = ACE_Time_Value (this->end_usage_.ru_utime) - ACE_Time_Value (this->begin_usage_.ru_utime); @@ -373,7 +359,7 @@ ACE_Profile_Timer::subtract (timeval &tdiff, timeval &t1, timeval &t0) } # endif /* ACE_HAS_GETRUSAGE */ -#else /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +#else void ACE_Profile_Timer::dump (void) const @@ -413,4 +399,20 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) return 0; } -#endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ +void +ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage) +{ + ACE_TRACE ("ACE_Profile_Timer::get_rusage"); + usage = 0; +} + + +void +ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) +{ + ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage"); + usage = 0; +} + +#endif /* defined (ACE_HAS_PRUSAGE_T) || + defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ |