歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux sleep 命令詳解[圖文]

Linux sleep 命令詳解[圖文]

日期:2017/2/28 14:45:07   编辑:Linux教程

sleep 命令詳解

linux sleep 命令用來睡眠一段時間,sleep 可以用來將目前動作延遲一段時間。時間的單位有:秒(s),分鐘(m),小時(h),天(d)

用法如下:

sleep Number(suffix)

默認單位是秒(s)

sleep 1 == sleep 1s

sleep 0.01

查看版本

linux sleep 與 windows sleep的區別

在linux裡,sleep 的單位是秒,也就是sleep 1000就是睡眠了1000 秒,而在windows中,如果調用sleep函數單位是毫秒,sleep(1000)則是睡眠了1秒。

Copyright © Linux教程網 All Rights Reserved