summaryrefslogtreecommitdiff
path: root/ACE/tests/High_Res_Timer_Test.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-03-29 07:23:46 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-03-29 07:23:46 +0000
commit7c4aa872f1d9205ecca685dd5c70643f6d98de5d (patch)
tree66ac91250462df8bdd32eeabe4d251388e5975a0 /ACE/tests/High_Res_Timer_Test.cpp
parentfc6c686c9c067ef5b3577edc62ef151cb191507d (diff)
downloadATCD-7c4aa872f1d9205ecca685dd5c70643f6d98de5d.tar.gz
Diffstat (limited to 'ACE/tests/High_Res_Timer_Test.cpp')
-rw-r--r--ACE/tests/High_Res_Timer_Test.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/ACE/tests/High_Res_Timer_Test.cpp b/ACE/tests/High_Res_Timer_Test.cpp
index 5bfcb7ca573..52968fc5309 100644
--- a/ACE/tests/High_Res_Timer_Test.cpp
+++ b/ACE/tests/High_Res_Timer_Test.cpp
@@ -59,12 +59,16 @@ check_micro_nano (ACE_hrtime_t microinterval, ACE_hrtime_t nanointerval)
? (microinterval - nanointerval)
: (nanointerval - microinterval));
if (nanointerval == 0)
- nanointerval = 1; // Prevent divide-by-zero
+ {
+ nanointerval = 1; // Prevent divide-by-zero
+ }
ACE_hrtime_t const promille_difference =
difference * 1000 / nanointerval;
if ((promille_difference < threshold) || (difference < 1500))
- return 0;
+ {
+ return 0;
+ }
else
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("The microseconds * 1000 of %Q ")
@@ -113,16 +117,13 @@ run_main (int argc, ACE_TCHAR *argv[])
u_int iterations = 1;
- //FUZZ: disable check_for_lack_ACE_OS
- ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("i:"));
- for (int c; (c = getopt ()) != -1; )
+ ACE_Get_Opt getoptarg (argc, argv, ACE_TEXT ("i:"));
+ for (int c; (c = getoptarg ()) != -1; )
{
- //FUZZ: enable check_for_lack_ACE_OS
-
switch (c)
{
case 'i':
- iterations = ACE_OS::atoi (getopt.opt_arg ());
+ iterations = ACE_OS::atoi (getoptarg.opt_arg ());
break;
}
}
@@ -135,10 +136,10 @@ run_main (int argc, ACE_TCHAR *argv[])
{
for (u_int j = 0; j < iterations; ++j)
{
- const ACE_Time_Value interval (0, intervals[i]);
+ ACE_Time_Value const interval (0, intervals[i]);
ACE_hrtime_t nanoseconds;
ACE_hrtime_t microseconds;
- const ACE_Time_Value measured = time_interval (interval,
+ ACE_Time_Value const measured = time_interval (interval,
nanoseconds,
microseconds);
time_t const interval_usec =