sleep

语法

sleep(X)

参数

X 是一个非负数。

详情

暂停程序 X 毫秒。

例子

for(s in 1:10){
   sleep(1000)
   print(s+" seconds passed.")
};

# output
1 seconds passed.
2 seconds passed.
3 seconds passed.
4 seconds passed.
5 seconds passed.
6 seconds passed.
7 seconds passed.
8 seconds passed.
9 seconds passed.