1PMPARSETIME(3)             Library Functions Manual             PMPARSETIME(3)
2
3
4

NAME

6       __pmParseTime - parse time point specification
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11
12       int  __pmParseTime(const char *string, struct timeval *logStart, struct
13       timeval *logEnd, struct timeval *rslt, char **errMsg)
14
15       cc ... -lpcp
16

DESCRIPTION

18       __pmParseTime is designed to encapsulate the interpretation of  a  time
19       point  specification in command line switches for use by the PCP client
20       tools.
21
22       This function expects to be called with the time point specification as
23       string.   If  the tool is running against PCP archive(s), you also need
24       to supply the start time of the first (only) archive as  logStart,  and
25       the end of the last (only) archive as logEnd.  See pmGetArchiveLabel(3)
26       and pmGetArchiveEnd(3) for how to obtain values for  these  parameters.
27       If  the  tool  is  running  against  a  live  feed of performance data,
28       logStart should be the current time (but could be aligned on  the  next
29       second  for example), while logEnd should have its tv_sec component set
30       to INT_MAX.
31
32       The rslt structure must be allocated before calling __pmParseTime.
33
34       You also need to set the current PCP reporting time zone  to  correctly
35       reflect the -z and -Z command line parameters before calling __pmParse‐
36       Time.  See pmUseZone(3) and friends for  information  on  how  this  is
37       done.
38
39       If  the conversion is successful, __pmParseTime returns 0, and fills in
40       rslt with the time value defined by the input parameters.  If the argu‐
41       ment strings could not be parsed, it returns -1 and a dynamically allo‐
42       cated error message string in errMsg.  Be sure to free(3C)  this  error
43       message string.
44

SEE ALSO

46       PMAPI(3),     pmGetArchiveEnd(3),    pmGetArchiveLabel(3),    pmNewCon‐
47       textZone(3),  pmNewZone(3),  pmParseInterval(3),  pmParseTimeWindow(3),
48       pmUseZone(3), __pmConvertTime(3) and __pmParseCtime(3).
49
50
51
52Performance Co-Pilot                  SGI                       PMPARSETIME(3)
Impressum