Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Main::TimeoutSignal Class Reference

Timeout signal class. More...

`#include <inti/main.h>`

List of all members.

## Public Types

- typedef Slot0< bool > SlotType
    Function signature for handlers connected to this signal.

## Public Member Functions

- Connection connect (const SlotType *slot, unsigned int interval)
    Connect a slot to be called periodically.

## Detailed Description

Timeout signal class.

## Member Function Documentation

Connection Inti::Main::TimeoutSignal::connect | ( | const SlotType * | slot,
|  | unsigned int | interval
| ) |

Connect a slot to be called periodically.

Parameters:

  slot | The slot to call periodically.
  interval | The time between calls to the function, in milliseconds.

Returns:
  A connection object that can be used to break or alter the connection.

The slot will be called repeatedly after interval milliseconds until the handler returns false, at which point the timeout is destroyed and will not be called again. If you return false you don't need to disconnect the timer. You can call Connection::is_connected() to check if the connection is connected.

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

- main.h

Main Page - Footer