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


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:
'0', '0.015', '0', '0'

See also Edit

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