Perl times 函式



描述

此函式返回一個包含當前程序及其子程序的使用者、系統、子級和子級系統時間的 4 元素列表。

語法

以下為此函式的簡單語法-

times

返回值

此函式返回 ARRAY,($usertime, $systemtime, $childsystem, $childuser)

示例

以下是顯示其基本用法的示例程式碼-

#!/usr/bin/perl -w

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

執行上面的程式碼時,它會生成以下結果 -

times() 0 0 0 0
perl_function_references.htm
廣告
© . All rights reserved.