summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/Misc/context_switch_time.cpp3
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;