#!/usr/bin -w # script to drive cpu use to max for a specific period use strict; our $now_sec; our $end_sec; our $busy_period=4; our $sleep_period=4; our $n1; our $n2; our $n3; our $n4; print "Press control - C or use task manager to kill me"; while (1) { ($end_sec)=$now_sec+$busy_period; $n1=$n2=$n3=$n4=3.14; while($now_sec<$end_sec){ $n1=$n2=$n3=$n4=$n1*$n2*$n3*$n4; ($now_sec)=localtime(time); } sleep($sleep_period); }