summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-01 14:29:29 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-01 14:29:29 +0000
commit1797f3bec18f24edf51447b33acfe5fb5888e691 (patch)
tree69d8a6dcceca9e20ff84c249a10e7ad40d267413
parentb2f750c6caba3d8c0a4051e67a81d4f7a4669051 (diff)
downloadATCD-1797f3bec18f24edf51447b33acfe5fb5888e691.tar.gz
(calc_delta): removed fabs wrap of real_time with
ACE_LACKS_FLOATING_POINT, because real_time is unsigned on those platforms. GHS complained about useless check for < 0. (do_test): changed sleep_time - delta < 0 check to sleep_time < delta, because GHS 1.8.8 complained (improperly) that sleep_time - delta could never be less than 0.
-rw-r--r--TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp
index 3c12f6854f5..31a27635637 100644
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp
@@ -145,7 +145,7 @@ Task_State::parse_args (int argc,char *argv[])
"[-c] // run the number of context switches test. \n\t\t\t"
"[-l] // use direct function calls, as opposed to CORBA requests. ONLY to be used with -u option.\n\t\t\t"
"[-m] // use multiple priorities for the low priority clients. \n"
- ,argv [0]));
+ ,argv [0]));
return -1;
}
@@ -1038,9 +1038,9 @@ Client::calc_delta (ACE_timer_t real_time,
{
ACE_timer_t new_delta;
#if defined (ACE_LACKS_FLOATING_POINT)
- new_delta = (40 * fabs (real_time) / 100) + (60 * delta / 100);
+ new_delta = 40 * real_time / 100 + 60 * delta / 100;
#else /* !ACE_LACKS_FLOATING_POINT */
- new_delta = (0.4 * fabs (real_time)) + (0.6 * delta);
+ new_delta = 0.4 * fabs (real_time) + 0.6 * delta;
#endif /* ACE_LACKS_FLOATING_POINT */
return new_delta;
}
@@ -1074,7 +1074,7 @@ Client::do_test (void)
// Delay a sufficient amount of time to be able to enforce
// the calling frequency, e.g., 20Hz, 10Hz, 5Hz, 1Hz.
ACE_Time_Value tv (0,
- (u_long) (sleep_time - delta < 0
+ (u_long) (sleep_time < delta
? 0
: sleep_time - delta));
ACE_OS::sleep (tv);