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

NAME

6       pmParseInterval,  pmParseHighResInterval  -  convert interval string to
7       binary time structure
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmParseInterval(const char *string, struct timeval *urslt,
13               char **errmsg);
14       int pmParseHighResInterval(const char *string, struct timespec *nrslt,
15               char **errmsg);
16
17       cc ... -lpcp
18

DESCRIPTION

20       pmParseInterval parses the argument string specifying  an  interval  of
21       time and fills in the tv_sec and tv_usec components of the urslt struc‐
22       ture to represent that interval (microsecond precision).
23
24       Similary, pmParseHighResInterval parses the argument string  and  fills
25       in  the  tv_sec and tv_nsec components of the nrslt structure to repre‐
26       sent that interval (nanosecond precision).
27
28       The input string is most commonly the argument following a  -t  command
29       line  option to a PCP application, and the syntax is fully described in
30       PCPIntro(1).
31

DIAGNOSTICS

33       pmParseInterval returns 0 and errmsg is undefined  if  the  parsing  is
34       successful.
35
36       If  the given string does not conform to the required syntax pmParseIn‐
37       terval returns -1 and a dynamically allocated error message  string  in
38       errmsg.   The  error  message is terminated with a newline and includes
39       the text of the input string along with an indicator of the position at
40       which the error was detected, e.g.
41                 4minutes 30mumble
42                            ^ -- unexpected value
43
44       In  the case of an error, the caller is responsible for calling free(3)
45       to release the space allocated for errmsg.
46

SEE ALSO

48       PCPIntro(1), free(3), PMAPI(3) and pmParseTimeWindow(3).
49
50
51
52Performance Co-Pilot                  PCP                   PMPARSEINTERVAL(3)
Impressum