X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ftime.h;h=f9b3f4daac3e5e9578c95a6124e50f4042e3c38b;hb=6efdc514c193f18c9ef840096750c37e78a01bf6;hp=6d07cdc74570d1b42fe3a2cbb0915f7d05c2a49c;hpb=46a15649d1e544dce95f76424a4870d69caa955c;p=libucw.git diff --git a/ucw/time.h b/ucw/time.h index 6d07cdc7..f9b3f4da 100644 --- a/ucw/time.h +++ b/ucw/time.h @@ -20,8 +20,20 @@ * system boot if POSIX monotonic clock is used. ***/ +/* time-stamp.c */ + timestamp_t get_timestamp(void); /** Get current time as a millisecond timestamp. **/ +/* time-conf.c */ + +/** + * A user type for parsing of time intervals in configuration files. + * It is specified as fractional seconds and internally converted to + * a <>. When conversion of + * a non-zero value yields zero, an error is raised. + **/ +extern struct cf_user_type timestamp_type; + /*** * === Timers * @@ -30,6 +42,8 @@ timestamp_t get_timestamp(void); /** Get current time as a millisecond timestam * the number of milliseconds elapsed since the previous read or initialization. ***/ +/* time-timer.c */ + void init_timer(timestamp_t *timer); /** Initialize a timer. **/ uns get_timer(timestamp_t *timer); /** Get the number of milliseconds since last init/get of a timer. **/ uns switch_timer(timestamp_t *oldt, timestamp_t *newt); /** Stop ticking of one timer and resume another. **/