diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-26 23:27:53 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-26 23:27:53 +0000 |
commit | 7b7f67c15fc531ef1f64168e0ae5fc27a642eb1e (patch) | |
tree | 5aad324c987d729ae1d5621229ffb99dc631baad /ace/Profile_Timer.h | |
parent | c41fd18724a777eba5a6889440f0e649df568f7e (diff) | |
download | ATCD-7b7f67c15fc531ef1f64168e0ae5fc27a642eb1e.tar.gz |
On Win32 platforms that support RUsage, Profile_Timer will use both that
and High Resolution Timers for measurements. Depending on the method, one
or the other will be used.
Diffstat (limited to 'ace/Profile_Timer.h')
-rw-r--r-- | ace/Profile_Timer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ace/Profile_Timer.h b/ace/Profile_Timer.h index 7271bb35f50..63d055db4dc 100644 --- a/ace/Profile_Timer.h +++ b/ace/Profile_Timer.h @@ -100,7 +100,7 @@ private: ACE_HANDLE proc_handle_; // I/O handle for /proc file system. -#elif defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) +#elif defined (ACE_HAS_GETRUSAGE) void subtract (timeval &tdiff, timeval &t0, timeval &t1); // Substract two timestructs and store their difference. @@ -112,9 +112,12 @@ private: timeval last_time_; // Keep track of the last time for incremental timing. -#else - ACE_High_Res_Timer timer_; #endif /* ACE_HAS_PRUSAGE_T */ + +#if defined (ACE_WIN32) || (!defined (ACE_HAS_PRUSAGE_T) && !defined (ACE_HAS_GETRUSAGE)) + ACE_High_Res_Timer timer_; + // The high resolution timer +#endif /* ACE_WIN32 || !ACE_HAS_PRUSAGE_T && !ACE_HAS_GETRUSAGE */ }; #if defined (__ACE_INLINE__) |