[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
char *timstr(WFDB_Time t) char *mstimstr(WFDB_Time t) |
These functions convert times or time intervals into null-terminated
ASCII strings. If the argument, t, is greater than zero, it is
treated as a time interval, and converted directly into HH:MM:SS
format by timstr
, or to HH:MM:SS.SSS format by
mstimstr
, with leading zero digits and colons suppressed. If
t is zero or negative, it is taken to represent negated elapsed
time from the beginning of the record, and it is converted to a time of
day using the base time for the record as indicated by the `hea'
file or the caller
(see section setbasetime);
in this case, if the base time is defined, the string will contain all
digits even if there are leading zeroes, it will include the date if a
base date is defined, and it will be marked as a time of day by being
bracketed (e.g., `[08:45:00 23/04/1989]'). The result of the
conversion is truncated to a multiple of a second by timstr
, or
to a multiple of a millisecond by mstimstr
. Note in each case
that the returned pointer addresses static data (shared by timstr
and mstimstr
), the contents of which are overwritten by
subsequent calls. See section Example 3: An Annotation Printer, for an illustration of the use of
mstimstr
; also see section Example 5: Reading Signal Specifications, for an example of the use of
timstr
.