## class fltk::Clock

### Class Hierarchy

    fltk::Widget
       |
       +----fltk::Clock

### Include Files

    #include <fltk/Clock.h>

### Description

This widget provides a round analog clock display and is provided for Forms compatibility. It installs a 1-second timeout callback using `fltk::add_timeout()`.

### Methods

- fltk::Clock
- ~Clock
- hour
- minute
- second
- value

#### fltk::Clock::Clock(int x, int y, int w, int h, const char *label = 0)

Creates a new `fltk::Clock` widget using the given position, size, and label string. The default boxtype is `fltk::NO_BOX`.

#### virtual fltk::Clock::~Clock()

The destructor also deletes all the children. This allows a whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. A kludge has been done so the `fltk::Clock` and all of it's children can be automatic (local) variables, but you must declare the `fltk::Clock` first, so that it is destroyed last.

#### int fltk::Clock::hour() const

Returns the current hour (0 to 23).

#### int fltk::Clock::minute() const

Returns the current minute (0 to 59).

#### int fltk::Clock::second() const

Returns the current second (0 to 60, 60 = leap second).

#### void fltk::Clock::value(ulong v)
void fltk::Clock::value(int h, int m, int s)
ulong fltk::Clock::value(void)

The first two forms of `value` set the displayed time to the given UNIX time value or specific hours, minutes, and seconds.

The third form of `value` returns the displayed time in seconds since the UNIX epoch (January 1, 1970).