From 09f57c8dffd9a8ba0983cce13381aef716f43801 Mon Sep 17 00:00:00 2001 From: chatty Date: Tue, 28 Nov 2000 14:19:34 +0000 Subject: *** empty log message *** --- utils/testtimer.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 utils/testtimer.cc (limited to 'utils/testtimer.cc') diff --git a/utils/testtimer.cc b/utils/testtimer.cc new file mode 100644 index 0000000..3dc4b0c --- /dev/null +++ b/utils/testtimer.cc @@ -0,0 +1,43 @@ +#include "Timer.h" +#include +#include + +int foo_counter = 0; + +void +foo (Millisecond) +{ + CcuTimeStamp t; + fprintf (stderr, "tic %d\n", (unsigned long) (t)); + foo_counter++; +} + +void +baz (Millisecond) +{ + CcuTimeStamp t; + fprintf (stderr, "tac %d\n", (unsigned long) (t)); +} + +void +bar (Millisecond) +{ + printf ("%d\n", foo_counter); +// exit (0); +} + +CcuList l; + +main () +{ +#if 1 + CcuTimer t (1000, foo, 5); + CcuTimer s (1000, baz); + CcuTimer tt (10000, bar); +#else + CcuTimer t (20, foo); + CcuTimer tt (10000, bar); +#endif + for (;;) + ; +} -- cgit v1.1