linux 中记录程序运行的时间
001、
[root@pc1 test1]# start=$(date +%s) ## 记录程序的开始时间 [root@pc1 test1]# echo $start 1671529118 [root@pc1 test1]# end=$(date +%s) ## 记录程序的结束时间 [root@pc1 test1]# echo $end 1671529132 [root@pc1 test1]# let elapse=end-start ## 记录程序的消耗时间 [root@pc1 test1]# echo $elapse 14


浙公网安备 33010602011771号