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