Next: , Previous: , Up: Clock Object   [Contents][Index]


15.7.4 Other Clock Routines

To get the displayed time (local time as modified by the adjustment described below) use the following routine

void fl_get_clock(FL_OBJECT *obj, int *h, int *m, int *s);

Upon function return the parameters are set as follows: h is between 0-23, indicating the hour, m is between 0-59, indicating the minutes, and s is between 0-59, indicating the seconds.

To display a time other than the local time, use the following routine

long fl_set_clock_adjustment(FL_OBJECT *obj, long adj);

where adj is in seconds. For example, to display a time that is one hour behind the local time, an adjustment of 3600 can be used. The function returns the old adjustment value.

By default, the digital clock uses 24hr system. You can switch the display to 12hr system (am-pm) by using the following routine

void fl_set_clock_ampm(FL_OBJECT *obj, int yes_no)