File: msr_starttime.3

package info (click to toggle)
libmseed 2.19.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,684 kB
  • sloc: ansic: 10,810; makefile: 145; sh: 114
file content (59 lines) | stat: -rw-r--r-- 2,225 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.TH MSR_STARTTIME 3 2015/03/02 "Libmseed API"
.SH NAME
msr_starttime - Start and end time determination for MSRecord structures

.SH SYNOPSIS
.nf
.B #include <libmseed.h>

.BI "hptime_t  \fBmsr_starttime\fP ( MSRecord *" msr " );"

.BI "hptime_t  \fBmsr_starttime_uc\fP ( MSRecord *" msr " );"

.BI "hptime_t  \fBmsr_endtime\fP ( MSRecord *" msr " );"
.fi

.SH DESCRIPTION
\fBmsr_starttime\fP returns the start time of the record as a high
precision epoch time (see \fBms_time(3)\fP).  Any time correction
given in the fixed section data header is applied if it has not
already been applied.  If Blockette 1001 is included and parsed the
microseconds indicated (field 4) are also applied.

NOTE: The record start time for a MSRecord structure is available
directly at MSRecord.starttime.  Libmseed based programs should use
that start time whenever possible (\fBmsr_unpack\fP uses
\fBmsr_starttime\fP to set MSRecord.starttime).

\fBmsr_starttime_uc\fP is a version of \fBmsr_starttime\fP that
applies no time corrections, just a basic conversion of the start time
values in the fixed section data header.

\fBmsr_endtime\fP returns the time of the last sample in the record as
a high precision epoch time (seed \fBms_time(3)\fP).  This is *not*
the time "covered" by the last sample, but the actual sample time.
This function calculates the record start time with
\fBmsr_starttime\fP and then adds the time covered by the samples in
the record which is calculated from the number of samples and sample
rate.

\fBmsr_endtime\fP will adjust the end time appropriately if the record
is known to contain a positive leap second.  If the
\fBms_readleapseconds\fP or \fBms_readleapsecondfile\fP routines have
been called to read a leap second file into an internal list, it will
be checked to know when leap seconds occur.  If a leap second list is
not available the fixed section data header is checked for a positive
leap second indicator.

.SH RETURN VALUES
\fBmsr_starttime\fP, \fBmsr_starttime_uc\fP and \fBmsr_endtime\fP
return a high precision epoch time on success and HPTERROR on error.

.SH SEE ALSO
\fBms_intro(3)\fP, \fBms_time(3)\fP and \fBmsr_unpack(3)\fP

.SH AUTHOR
.nf
Chad Trabant
IRIS Data Management Center
.fi