Perl times Function



Description

This function returns a four-element list giving the user, system, child, and child system times for the current process and its children.

Syntax

Following is the simple syntax for this function −

times

Return Value

This function returns ARRAY, ($usertime, $systemtime, $childsystem, $childuser)

Example

Following is the example code showing its basic usage −

#!/usr/bin/perl -w

($usertime, $systemtime, $childsystem, $childuser) = times();
print("times() $usertime $systemtime $childsystem $childuser\n");

When above code is executed, it produces the following result −

times() 0 0 0 0
perl_function_references.htm
Advertisements