1//
2// TimerTest.h
3//
4// Definition of the TimerTest class.
5//
6// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
7// and Contributors.
8//
9// SPDX-License-Identifier: BSL-1.0
10//
11
12
13#ifndef TimerTest_INCLUDED
14#define TimerTest_INCLUDED
15
16
17#include "Poco/Util/Util.h"
18#include "Poco/CppUnit/TestCase.h"
19#include "Poco/Util/TimerTask.h"
20#include "Poco/Event.h"
21
22
23class TimerTest: public CppUnit::TestCase
24{
25public:
26 TimerTest(const std::string& name);
27 ~TimerTest();
28
29 void testScheduleTimestamp();
30 void testScheduleClock();
31 void testScheduleInterval();
32 void testScheduleAtFixedRate();
33 void testScheduleIntervalTimestamp();
34 void testScheduleIntervalClock();
35 void testCancel();
36 void testCancelAllStop();
37 void testCancelAllWaitStop();
38
39 void setUp();
40 void tearDown();
41
42 void onTimer(Poco::Util::TimerTask& task);
43
44 static CppUnit::Test* suite();
45
46private:
47 Poco::Event _event;
48};
49
50
51#endif // TimerTest_INCLUDED
52