Main Page Namespace List Class Hierarchy Compound List Compound Members

# ZThread::TimerEvent Class Reference

`#include <Timer.h>`

List of all members.

## Public Methods
| TimerEvent (const TimerEvent &)
| TimerEvent (unsigned long, unsigned long, bool periodic=false)
unsigned long | getId () const
unsigned long | getExpiration () const
unsigned long | getInterval () const
bool | isExpired () const
bool | isPeriodic () const
TimerEvent& | operator= (const TimerEvent &)
bool | operator== (const TimerEvent &e) const
bool | operator< (const TimerEvent &e) const
bool | operator> (const TimerEvent &e) const
| operator unsigned long () const
## Static Protected Methods
unsigned long | now () throw ()

## Detailed Description

Author:
  Eric Crahen

Version:
  1.3.0

Date:
  03-10-2001

This class just encapsulates the timing details for each event and makes them a bit easier to work with.

## Constructor & Destructor Documentation

TimerEvent ( | const TimerEvent & )

  | Create a TimerEvent by copying another Parameters:
  const | TimerEvent& - event to copy

TimerEvent ( | unsigned long,
| unsigned long,
| bool periodic = false )

  | Create a new event Parameters:
  unsigned | long - time at which the timer should expire; milliseconds from now
  unsigned | long - timer event id
  bool | - flag to indicate if this is a repeating/periodic event
  Parameters:
  long |
  long |
  periodic |

## Member Function Documentation

unsigned long getExpiration ( | ) const

| Get the time left until this event should occur Returns: unsigned long - time till event

unsigned long getId ( | ) const`[inline]`

| Get the event id Returns: unsigned long - event id

unsigned long getInterval ( | ) const`[inline]`

| Get the interval for the event Returns: unsigned long - interval

bool isExpired ( | ) const

| Check if the event has expired Returns: bool - event expired if true

bool isPeriodic ( | ) const`[inline]`

| Check if this is a periodic/repeating event. Returns: bool - event is periodic/repeating if true

unsigned long now ( | ) throw ()`[static, protected]`

| Get the current time in milliseconds

operator unsigned long ( | ) const`[inline]`

| Casting operator to that evaluates to the event id

bool operator< ( | const TimerEvent & e ) const`[inline]`

  | Check if the TimerEvent expired before another Parameters:
  const | TimerEvent& - timer event to compare
  Parameters:
  e |

TimerEvent & operator= ( | const TimerEvent & )

  | Copy an exisitng TimerEvent Parameters:
  const | TimerEvent& - timer event to copy

bool operator== ( | const TimerEvent & e ) const`[inline]`

  | Check if the time two events expire is the same Parameters:
  const | TimerEvent& - timer event to compare
  Parameters:
  e |

bool operator> ( | const TimerEvent & e ) const`[inline]`

  | Check if the TimerEvent expired after another Parameters:
  const | TimerEvent& - timer event to compare
  Parameters:
  e |

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

- Timer.h