From 4b9289cfb260f4bcecaf23a810584ef6ef8e8501 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 30 Mar 2011 22:33:41 +0000 Subject: Ok, string stuff is working much, much better, a load of new unit tests have been added, and I deleted a whole slew of stupid old tests that I don't need. --- src/tests/minicron.cpp | 63 -------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/tests/minicron.cpp (limited to 'src/tests/minicron.cpp') diff --git a/src/tests/minicron.cpp b/src/tests/minicron.cpp deleted file mode 100644 index aed63e2..0000000 --- a/src/tests/minicron.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2007-2011 Xagasoft, All rights reserved. - * - * This file is part of the libbu++ library and is released under the - * terms of the license contained in the file LICENSE. - */ - -#include "bu/minicron.h" -#include "bu/sio.h" - -#include - -using namespace Bu; - -Bu::MiniCron mCron; - -void job0( Bu::MiniCron::Job &job ) -{ - sio << time( NULL ) << ": job0( id = " << job.getId() << ", count = " - << job.getRunCount() << ")" << sio.nl; -} - -void job1( Bu::MiniCron::Job &job ) -{ - sio << time( NULL ) << ": job1( id = " << job.getId() << ", count = " - << job.getRunCount() << ")" << sio.nl; - mCron.removeJob( 4 ); -} - -void job2( Bu::MiniCron::Job &job ) -{ - sio << time( NULL ) << ": job2( id = " << job.getId() << ", count = " - << job.getRunCount() << ")" << sio.nl; -} - -void job3( Bu::MiniCron::Job &job ) -{ - sio << time( NULL ) << ": job3( id = " << job.getId() << ", count = " - << job.getRunCount() << ")" << sio.nl; -} - -int main() -{ - mCron.addJob( - "job0", slot( &job0 ), MiniCron::TimerInterval( time(NULL)+3, 5 ) ); - mCron.addJob( - "job1", slot( &job1 ), MiniCron::TimerInterval( time(NULL)+10, 8 ) ); - mCron.addJob( - "job2", slot( &job2 ), MiniCron::TimerBasic("weekly wed 17") ); - mCron.addJob( - "job3", slot( &job3 ), MiniCron::TimerInterval( time(NULL)+1, 2 ) ); - - sio << time( NULL ) << ": Program started." << sio.nl; - - for(;;) - { - usleep( 50000 ); - mCron.poll(); - } - - return 0; -} - -- cgit v1.2.3