Browse Source

Now with ceil() limits

Zachary Kotlarek 13 years ago
parent
commit
15a4b88b58
1 changed files with 4 additions and 1 deletions
  1. 4 1
      dmx/projectorPower.pl

+ 4 - 1
dmx/projectorPower.pl

@@ -244,12 +244,15 @@ sub sayShutdown($) {
 
 	# Determine the unit
 	my $unit     = 'minute';
-	my $timeLeft = ceil($minutesLeft);
+	my $timeLeft = $minutesLeft;
 	if ($minutesLeft < 1) {
 		$timeLeft = $minutesLeft * 60;
 		$unit     = 'second';
 	}
 
+	# Avoid saying "0" unless we *really* mean it
+	$timeLeft = ceil($timeLeft);
+
 	# Add an "s" as needed
 	my $plural = 's';
 	if ($timeLeft == 1) {