1PMPARSEINTERVAL(3) Library Functions Manual PMPARSEINTERVAL(3)
2
3
4
6 pmParseInterval - convert interval string to timeval structure
7
9 #include <pcp/pmapi.h>
10
11 int pmParseInterval(const char *string, struct timeval *rslt,
12 char **errmsg);
13
14 cc ... -lpcp
15
17 pmParseInterval parses the argument string specifying an interval of
18 time and fills in the tv_sec and tv_usec components of the rslt struc‐
19 ture to represent that interval.
20
21 The input string is most commonly the argument following a -t command
22 line option to a PCP application, and the syntax is fully described in
23 PCPIntro(1).
24
26 pmParseInterval returns 0 and errmsg is undefined if the parsing is
27 successful.
28
29 If the given string does not conform to the required syntax pmParseIn‐
30 terval returns -1 and a dynamically allocated error message string in
31 errmsg. The error message is terminated with a newline and includes
32 the text of the input string along with an indicator of the position at
33 which the error was detected, e.g.
34 4minutes 30mumble
35 ^ -- unexpected value
36
37 In the case of an error, the caller is responsible for calling free(3)
38 to release the space allocated for errmsg.
39
41 PCPIntro(1), free(3), PMAPI(3) and pmParseTimeWindow(3).
42
43
44
45Performance Co-Pilot PCP PMPARSEINTERVAL(3)