Add script to hog cpu for given time

This commit is contained in:
hjp 2016-07-05 19:55:43 +00:00
parent e3c6f75cfd
commit e78b9530ef
1 changed files with 10 additions and 0 deletions

10
hogs/cpuhogt Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/perl
use v5.20;
use warnings;
use Time::HiRes qw(time);
my $t0 = time;
for (;;) {
my $dt = time - $t0;
last if $dt > $ARGV[0];
}