Logo Search packages:      
Sourcecode: poco version File versions  Download package

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

Poco::Util::Timer Class Reference

#include <Timer.h>

Inheritance diagram for Poco::Util::Timer:
Inheritance graph
Collaboration diagram for Poco::Util::Timer:
Collaboration graph

List of all members.

Public Member Functions

void cancel ()
 Destroys the Timer, cancelling all pending tasks.
void schedule (TimerTask::Ptr pTask, Poco::Timestamp time)
void schedule (TimerTask::Ptr pTask, long delay, long interval)
void schedule (TimerTask::Ptr pTask, Poco::Timestamp time, long interval)
void scheduleAtFixedRate (TimerTask::Ptr pTask, Poco::Timestamp time, long interval)
void scheduleAtFixedRate (TimerTask::Ptr pTask, long delay, long interval)
 Timer (Poco::Thread::Priority priority)
 Creates the Timer.
 ~Timer ()

Protected Member Functions

void run ()

Private Member Functions

Timeroperator= (const Timer &)
 Timer (const Timer &)

Private Attributes

Poco::TimedNotificationQueue _queue
Poco::Thread _thread

Detailed Description

A Timer allows to schedule tasks (TimerTask objects) for future execution in a background thread. Tasks may be scheduled for one-time execution, or for repeated execution at regular intervals.

The Timer object creates a thread that executes all scheduled tasks sequentially. Therefore, tasks should complete their work as quickly as possible, otherwise subsequent tasks may be delayed.

Timer is save for multithreaded use - multiple threads can schedule new tasks simultaneously.

Acknowledgement: The interface of this class has been inspired by the java.util.Timer class from Java 1.3.

Definition at line 54 of file Timer.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index