GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::G::TimeoutSignal Class Reference

A Timeout signal class. More...

#include <gfc/main.hh>

List of all members.

Public Types

Public Member Functions


Detailed Description

A Timeout signal class.

Timeout signal is a convenience class that lets you connect a callback slot to the default main context. If your using a different context, for example, inside a thread, you should use TimeoutSource instead. If the slot returns false the timeout source will be removed.


Member Function Documentation

sigc::connection GFC::G::TimeoutSignal::connect const SlotType slot,
unsigned int  interval,
int  priority = PRIORITY_DEFAULT_IDLE
 

Sets a callback slot to be called at regular intervals, with the given priority.

Parameters:
slot The sigc::slot to call periodically.
interval The time between calls to the function, in milliseconds.
priority The priority of the idle source.
Returns:
A sigc::connection object that can be used to break or alter the connection.
The slot is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the function will not be called again. Typically the priority will be in the range between G::PRIORITY_DEFAULT_IDLE and G::PRIORITY_HIGH_IDLE.

Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to 'catch up' time lost in delays).


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:04:57 2004 for GFC-Core by doxygen 1.3.8