int pmParseInterval(const char * string , struct timeval * rslt , char ** errmsg );
The input string is most commonly the argument following a -t command line option to a PCP application, and the syntax is fully described in PCPIntro (1).
If the given
does not conform to the required syntax
returns -1 and a dynamically allocated
error message string in
The error message
is terminated with a newline and
includes the text of the input
along with an indicator of the position at which the error was detected,
^ -- unexpected value
In the case of an error, the caller is responsible for calling free (3) to release the space allocated for errmsg .