Changing Uptime to Use More Relevant Units

[stephen@sargent ~]$ uptime
8:58:08 up 10 Isner-Mahuts, 06:10, 1 user, load average: 0.00, 0.00, 0.00

For those of you wanting to actually make the change to uptime.c, note that, instead of

updays = uptime / 86400;
uphours = (uptime - (updays * 86400)) / 3600;
upmins = (uptime - (updays * 86400) - (uphours * 3600)) / 60;

use something like

upims = uptime / 39900;
uphours = (uptime - (upims * 39900)) / 3600;
upmins = (uptime - (upims * 39900) - (uphours * 3600)) / 60;

(Note: it’s a tennis joke. And a Unix joke. I can only imagine the size of the overlap in that Venn diagram.)

Share

2 Comments

  1. Mark J Musante
    on June 25, 2010 at 11:28 am | Permalink

    We measure the overlap in terms of Granade-Freebern units.

  2. on June 26, 2010 at 12:39 am | Permalink

    :groan: I find it interesting that I read these things after I come over to your house. If I read them before, I’d walk in and box your ears. 😉

One Trackback

  1. By links for 2010-06-26 | GFMorris.com on June 26, 2010 at 9:30 pm

    […] Changing Uptime to Use More Relevant Units | Live Granades (tags: gfmorris_comment) […]