Name

timestr

Synopsis

timestr (timediff[, style[, format]])

Converts times to printable strings. Always exported. Takes the following arguments:

timediff

The object containing the times to be formatted.

style

The output format. The possible values of style are:

all

Shows all of the following times: wallclock, user, system, user time of children, and system time of children

auto

Like all, except that if the children times are both 0, it acts like noc

noc

Shows all except the two children times

nop

Shows only wallclock and the two children times

format

Indicates the printf(3)-style format specifier (without the leading %) to use for printing the times. The default is 5.2f.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.