1秒未満のスリープ処理をPerl関数のselectで生成
Perl言語のselect関数を使用して、1秒未満のスリープ処理を実行しました。
#!/opt/local/bin/perl
use strict;
use warnings;
select(undef, undef, undef, 0.5);
exit;
サンプルコードです。スリープ処理を0.5秒に指定しました。
写真やサンプルプログラムなど、日々の気になった出来事をメモしてる個人的なブログです。
Perl言語のselect関数を使用して、1秒未満のスリープ処理を実行しました。
#!/opt/local/bin/perl
use strict;
use warnings;
select(undef, undef, undef, 0.5);
exit;
サンプルコードです。スリープ処理を0.5秒に指定しました。