From d5818d271243ef0ce903a38e19da936262d73d37 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Fri, 27 Sep 2002 03:03:00 +0000 Subject: [PATCH] Changed to use Alina's Formula git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1005 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd-web/src/webpmd.pl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl index 4505027b77..4893c1e1f7 100644 --- a/pmd-web/src/webpmd.pl +++ b/pmd-web/src/webpmd.pl @@ -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=; 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=""; opendir(DIR, "jobs/") or return "can't open jobs directory!";
ProjectHome pageProblems found