help | logout
smallTimeConvert

smallTimeConvert

Name

smallTimeConvert -- Converts small time value.

Synopsis

$err = $mod->smallTimeConvert($data);

Description

This function converts the given string data to a double representation. The string may contain "2 msecs", or "2.56 milliseconds", etc).

Available suffixes are:

  • milliseconds, millisecs, msecs

  • microseconds, microsecs, usecs

  • nanoseconds, nanosecs, nsecs

  • seconds, secs

Returns

Returns a string representation of the given data (or -1 if an error occurred). In case of error, the program will croak() with an appriopriate message.