diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-04 22:13:49 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-04 22:13:49 +0000 |
commit | d3ec9467c62169e669510ae9688b797b0692104f (patch) | |
tree | 5ee2004cde79d5972f5e165d81ca13efd66e4632 /performance-tests | |
parent | fb16e9bfc91d20f71dfe75cda90f0d3efcaf52a5 (diff) | |
download | ATCD-d3ec9467c62169e669510ae9688b797b0692104f.tar.gz |
(High_Priority_Synchronized_Task::svc): check if nsec is >=
mutex_acquire_release_time, to avoid adding in negative context_switch_times.
Diffstat (limited to 'performance-tests')
-rw-r--r-- | performance-tests/Misc/context_switch_time.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp index 8ace1dbf09a..1bde89c2fc2 100644 --- a/performance-tests/Misc/context_switch_time.cpp +++ b/performance-tests/Misc/context_switch_time.cpp @@ -862,7 +862,8 @@ High_Priority_Synchronized_Task::svc () ACE_hrtime_t nsec; timer_.elapsed_time (nsec); const ACE_UINT32 context_switch_time = - ACE_U64_TO_U32 (nsec) - mutex_acquire_release_time; + ACE_U64_TO_U32 (nsec) >= mutex_acquire_release_time ? + ACE_U64_TO_U32 (nsec) - mutex_acquire_release_time : 0; total_time_ += context_switch_time; |