此函数返回一个四元素列表,为当前进程及其子进程提供用户,系统,子进程和子系统时间。
以下是此函数的简单语法-
times
此函数返回ARRAY,($usertime,$systemtime,$childsystem,$childuser)
以下是显示其基本用法的示例代码-
链接:https://www.learnfk.comhttps://www.learnfk.com/perl/perl-times.html
来源:LearnFk无涯教程网
#!/usr/bin/perl -w ($usertime, $systemtime, $childsystem, $childuser)=times(); print("times() $usertime $systemtime $childsystem $childuser\n");
执行上述代码后,将产生以下输出-
times() 0 0 0 0
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)