summaryrefslogtreecommitdiff
path: root/tests/Timer_Queue_Test.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-27 04:19:14 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-27 04:19:14 +0000
commit1edf15301419dac7da61d2c5f4f375c0b5f5fad6 (patch)
tree330ba5bb0ede8af5413145813a9ba6a76ca6dfcd /tests/Timer_Queue_Test.cpp
parentd09dc5b5096e2ae98e297315a0d3aec09c9ae941 (diff)
downloadATCD-1edf15301419dac7da61d2c5f4f375c0b5f5fad6.tar.gz
Added testing for ACE_Timing_Wheel, with and without node preallocation.
Diffstat (limited to 'tests/Timer_Queue_Test.cpp')
-rw-r--r--tests/Timer_Queue_Test.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp
index d08b8518f9c..1591cf8c7fe 100644
--- a/tests/Timer_Queue_Test.cpp
+++ b/tests/Timer_Queue_Test.cpp
@@ -23,6 +23,7 @@
#include "ace/Profile_Timer.h"
#include "ace/Timer_List.h"
#include "ace/Timer_Heap.h"
+#include "ace/Timer_Wheel.h"
#include "test_config.h"
static void
@@ -268,6 +269,8 @@ static Timer_Queues timer_queues[] =
{
{ 0, "ACE_Timer_Heap (preallocated)" },
{ 0, "ACE_Timer_Heap (non-preallocated)" },
+ { 0, "ACE_Timer_Wheel (preallocated)" },
+ { 0, "ACE_Timer_Wheel (non-preallocated)" },
{ new ACE_Timer_List, "ACE_Timer_List" },
{ 0, 0 },
};
@@ -292,6 +295,16 @@ main (int argc, char *argv[])
// ACE_Timer_Heap (max_iterations),
-1);
+ // Preallocate memory.
+ ACE_NEW_RETURN (timer_queues[2].queue_,
+ ACE_Timer_Wheel (1024, 1000, ACE_DEFAULT_TIMERS),
+ -1);
+
+ // Don't preallocate memory.
+ ACE_NEW_RETURN (timer_queues[3].queue_,
+ ACE_Timer_Wheel,
+ -1);
+
ACE_NEW_RETURN (timer_ids,
int[max_iterations],
-1);