描述
該函數返回一個 four-element 列表,給出當前進程及其子進程的用戶、係統、子進程和子係統時間。
用法
以下是此函數的簡單語法 âˆ'
times
返回值
此函數返回數組,($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 time用法及代碼示例
- Perl tie用法及代碼示例
- Perl tell()用法及代碼示例
- Perl tr用法及代碼示例
- Perl telldir用法及代碼示例
- Perl tell用法及代碼示例
- Perl sin()用法及代碼示例
- Perl abs()用法及代碼示例
- Perl kill用法及代碼示例
- Perl chop()用法及代碼示例
- Perl wantarray用法及代碼示例
- Perl gmtime用法及代碼示例
- Perl exists()用法及代碼示例
- Perl split用法及代碼示例
- Perl localtime用法及代碼示例
- Perl delete()用法及代碼示例
- Perl undef用法及代碼示例
注:本文由純淨天空篩選整理自 Perl times Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。