[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int setbasetime(char *string) |
This function sets the base time used by the time-conversion functions
timstr
and strtim
. Its argument is a null-terminated
ASCII string in HH:MM:SS format. An optional base date in
dd/mm/yyyy format can follow the time in string; if present,
the date should be separated from the time by a space or tab character. If
string is empty or NULL
, the current date and time are read
from the system clock. Use setbasetime
after defining the sampling
frequency and before creating a header file
(see section newheader).
See section Example 8: Creating a New Database Record, for an illustration of the use of setbasetime
.
Database records are sometimes obtained from analog tapes for which a tape counter is available. Since many analog tape recorders lack elapsed time indicators, it is often useful to identify events in the analog tape using counter values. A similar situation may arise if a chart recording or other hard copy with numbered pages is to be compared with a database record. To simplify cross-referencing between the analog tape or chart and the digital database record, the WFDB library supports conversion of counter values (or page numbers) to time. For this to be possible, the counter must be linear (i.e., it must change at the same rate throughout the tape; this is not true of those that count the number of revolutions of the supply or take-up reel), and the base counter value (the counter value or page number corresponding to sample 0) and the counter frequency (the difference between counter values separated by a one-second interval, or the reciprocal of the number of seconds per page) must be defined. The following four functions, first introduced in WFDB library version 5.2, are used to obtain or set the values of these parameters.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |