# Poco::Util

# template < class C >

# class TimerTaskAdapter

Library: Util
Package: Timer
Header: Poco/Util/TimerTaskAdapter.h

## Description

This class template simplifies the implementation of TimerTask objects by allowing a member function of an object to be called as task.

## Inheritance

Direct Base Classes: TimerTask

All Base Classes: Poco::RefCountedObject, Poco::Runnable, TimerTask

## Member Summary

Member Functions: run

Inherited Functions: cancel, duplicate, isCancelled, lastExecution, operator =, referenceCount, release, run, updateLastExecution

## Types

### void

typedef void (C::* Callback)(TimerTask &);

## Constructors

### TimerTaskAdapter

TimerTaskAdapter() = delete;

### TimerTaskAdapter

TimerTaskAdapter(
C & object,
Callback method
);

Creates the TimerTaskAdapter, using the given object and its member function as task target.

The member function must accept one argument, a reference to a TimerTask object.

## Destructor

### ~TimerTaskAdapter

~TimerTaskAdapter() = default;

Destroys the TimerTaskAdapter.

## Member Functions

### run

void run();

See also: Poco::Runnable::run()