Permalink
Browse files

Correct seconds displaying in uptime

  • Loading branch information...
1 parent 17ff4ce commit 95f5064747c56ed04db1f0465fb56ccab00b749a @Minoru committed May 4, 2011
Showing with 9 additions and 1 deletion.
  1. +3 −0 CHANGELOG
  2. +6 −1 sysinfo.pl
View
@@ -1,3 +1,6 @@
+0.4.2 (4 May 2011)
+ - bugfix: seconds wasn't displayed right in uptime (sometimes there was just one digit in there)
+
0.4.1 (17 Jul 2010)
- little performance optimization: kernel version and audio/video devices description are now getting cached
View
@@ -219,7 +219,12 @@ sub getUptime {
} else {
$msg .= "$minutes";
};
- $msg .= ":$seconds";
+ if ($seconds < 10)
+ {
+ $msg .= ":0$seconds";
+ } else {
+ $msg .= "$seconds";
+ }
return $msg;
}

0 comments on commit 95f5064

Please sign in to comment.