1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fixed bad variable name in uptime(1), it's usecs not msecs.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-12-23 19:53:47 +01:00
parent ee125f01e2
commit b5fe020b7a

View file

@ -32,13 +32,13 @@ void PrintElement(size_t num, const char* single, const char* multiple)
int main(int argc, char* argv[])
{
uintmax_t mssinceboot;
if ( uptime(&mssinceboot) ) { perror("uptime"); return 1; }
uintmax_t usecssinceboot;
if ( uptime(&usecssinceboot) ) { perror("uptime"); return 1; }
PrintElement(Days(mssinceboot), "day", "days");
PrintElement(Hours(mssinceboot), "hour", "hours");
PrintElement(Minutes(mssinceboot), "min", "mins");
PrintElement(Seconds(mssinceboot), "sec", "secs");
PrintElement(Days(usecssinceboot), "day", "days");
PrintElement(Hours(usecssinceboot), "hour", "hours");
PrintElement(Minutes(usecssinceboot), "min", "mins");
PrintElement(Seconds(usecssinceboot), "sec", "secs");
printf("\n");
return 0;