Skip to content

Commit

Permalink
Fixed a bug in uptime presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
casasfernando committed Apr 26, 2021
1 parent be77e8b commit 532bcb2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Services/System.vala
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ namespace WingpanelSystemMonitor {

if (days > 0) {
upsec = upsec % (24 * 3600);
int hours = upsec / 3600;
upsec %= 3600;
int minutes = upsec / 60;
upsec %= 60;
_uptime = days.to_string ().concat (" days, ", hours.to_string (), ":", minutes.to_string (), ":", upsec.to_string ());
_uptime = days.to_string ().concat (" days, ", Granite.DateTime.seconds_to_time (upsec));
} else {
_uptime = Granite.DateTime.seconds_to_time ((int)uptime.uptime);
}
Expand Down

0 comments on commit 532bcb2

Please sign in to comment.