libsacio
1.0.2
Seismic Analysis Code I/O Library
|
Long duration, high precision timing. More...
Functions | |
char * | strptime64 (const char *buf, const char *fmt, struct TM *tm, int64_t *ns) |
Parse a string into a TM value. More... | |
size_t | strftime64 (char *dst, size_t n, const char *fmt, struct TM *tm, int64_t ns) |
Format a struct TM value. More... | |
Long duration, high precision timing.
size_t strftime64 | ( | char * | dst, |
size_t | n, | ||
const char * | fmt, | ||
struct TM * | tm, | ||
int64_t | ns | ||
) |
Format a struct TM value.
Format a timespec64 according to the format specifiers
%%
– %
character%Y
– Year, 4 digits, zero padded%j
– Day of the year, 3 digits, zero padded%m
– Month number, 2 digits, zero padded%d
– Day of the month, 2 digits, zero padded%H
– Hour, 2 digits, zero padded%M
– Minute, 2 digits, zero padded%S
– Seconds, 2 digits, zero padded%f
– partial seconds as nanoseconds, prefix digit defines the number of leading digits to show%F
– alias for Y-m-d
%T
– alias for H:M:S
%b
– Abbreviated Month Namedst | Output character string |
n | Length of dst |
fmt | Format for character string |
tm | input struct TM |
ns | input nanoseconds |
char * strptime64 | ( | const char * | buf, |
const char * | fmt, | ||
struct TM * | tm, | ||
int64_t * | ns | ||
) |
Parse a string into a TM value.
Parse a timespec64 according to the format specifiers
%%
– %
character%Y
– Year%j
– Day of the year, 1-366%m
– Month number, 1-12%d
– Day of the month, 1-31%H
– Hour, 0-23%M
– Minute, 0-59%S
– Seconds, 0-60%f
– partial seconds as nanosecondsbuf | Input character string |
fmt | Format to interpret the charater string |
tm | struct TM to place values into |
ns | output for nanoseconds |