X-Git-Url: https://git.llucax.com/software/eventxx.git/blobdiff_plain/3de7450f04f8d9cd241eb600da57cbe0539aa62c..2c722f14fdce3f1a32bf26eb26d316cced826ba4:/test/test-time.cpp?ds=sidebyside diff --git a/test/test-time.cpp b/test/test-time.cpp index c1326b4..5dafbe5 100644 --- a/test/test-time.cpp +++ b/test/test-time.cpp @@ -2,7 +2,7 @@ * Compile with: * c++ -I/usr/local/include -o time-test time-test.cpp -L/usr/local/lib -levent * - * Wed 2006-12-27 - Modified by Leandro Lucarella + * Wed 2006-12-27 - Modified by Leandro Lucarella * * Adapted to test the C++ inteface. * @@ -18,14 +18,14 @@ #include #include -#include +#include int called = 0; #define NEVENT 20000 -event::ctimer* ev[NEVENT]; -event::dispatcher d; +eventxx::ctimer* ev[NEVENT]; +eventxx::dispatcher d; void time_cb(int fd, short event, void *arg) @@ -34,7 +34,7 @@ time_cb(int fd, short event, void *arg) if (called < 10*NEVENT) { for (int i = 0; i < 10; i++) { - event::time tv(0, random() % 50000L); + eventxx::time tv(0, random() % 50000L); int j = random() % NEVENT; if (tv.usec() % 2) d.add(*ev[j], tv); @@ -49,8 +49,8 @@ main (int argc, char **argv) { for (int i = 0; i < NEVENT; i++) { /* Initalize one event */ - ev[i] = new event::ctimer(time_cb, NULL); - d.add(*ev[i], event::time(0, random() % 50000L)); + ev[i] = new eventxx::ctimer(time_cb, NULL); + d.add(*ev[i], eventxx::time(0, random() % 50000L)); } d.dispatch();