Perl Programming/Keywords/times

Previous: time Keywords Next: tr

The times keyword

edit

times returns a four-element list that contains the user and the system time in seconds as well as any exited children of it.

Syntax

edit
  times

Examples

edit
  The code
($user, $system, $cuser, $csystem) = times;

print ($user, $system, $cuser, $csystem) . "\n";
print "\n";
print "'" . $user . "', '" . $system . "', '" . $cuser . "', '" . $csystem . "'\n";
prints first consecutively the user, system time, and the exited children (non did exist), then with separated with a comma:
00.01500
'0', '0.015', '0', '0'

See also

edit
gmtime localtime time times utime
Previous: time Keywords Next: tr