3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

黒い画面で1秒未満のスリープを行うには

Last updated at Posted at 2015-03-11

追記

実はフツーのsleepコマンドで出来た

コメント欄で教えて頂いたように、今どきのLinuxやOSXや他のUnix(自分はNetBSDで確認)でも小数点以下を指定することで1秒未満のスリープが出来ました。

追記ここまで

やり方

PerlのTime::HiResのスリープを使えば、小数点以下の秒の指定ができる。
これをワンライナーで以下のように書けば、コマンドラインで1秒未満のスリープができる。

perl -MTime::HiRes -e 'Time::HiRes::sleep(0.3)'

何でこんな必要があったのかは

3
3
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?