https://www.cnblogs.com/yeungchie/
使用此模块可以解决默认函数
sleep
睡眠时间无法小于 1 秒的问题。
使用方式
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use Time::HiRes qw(sleep time);
my $time1 = time;
sleep 0.1;
my $time2 = time;
say "time1 - $time1";
say "time2 - $time2";
# time1 - 1628514069.54491
# time2 - 1628514069.64516
其它函数
sleep
- sleep
- usleep
- nanosleep
alarm
- alarm
- ualarm
time
- time
- gettimeofday