Changed to use Alina's Formula

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1005 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-09-27 03:03:00 +00:00
parent 7be7975afd
commit d5818d2712

View File

@ -48,8 +48,10 @@ sub default() {
}
sub printStats() {
# we're starting each build at 10 past the hour, so...
my $offset = 10;
print hr();
print b("Stats:"), br(), "There are ", getTimeUntil(), " minutes until the next run";
print b("Stats:"), br(), "There are ", ((60 + $offset) - localtime()->min) % 60, " minutes until the next run";
open(FILE,"lastruntime.txt");
my $lastruntime=<FILE>;
print br();
@ -58,15 +60,6 @@ sub printStats() {
}
sub getTimeUntil() {
my $tm = localtime;
my $timeuntil = 70 - $tm->min;
if ($tm->min<=10) {
$timeuntil = 10 - $tm->min;
}
return $timeuntil;
}
sub loadProjectList() {
my $result="<table><tr><th>Project</th><th></th><th>Home page</th><th>Problems found</th></tr>";
opendir(DIR, "jobs/") or return "can't open jobs directory!";