Subversion Repositories Kolibri OS

Rev

Rev 2735 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. int cmd_uptime(char param[])
  3. {
  4. unsigned        time_tick, up_days, up_hours, up_minutes, up_seconds, up_millisecs;
  5.  
  6. time_tick = kol_time_tick();
  7. up_days = (time_tick/(24*60*60*100));
  8. up_hours = (time_tick/(60*60*100))%24;
  9. up_minutes = (time_tick/(60*100))%60;
  10. up_seconds = (time_tick/100)%60;
  11. up_millisecs = (time_tick*10)%100;
  12.  
  13. #if LANG_ENG
  14.         printf ("  Uptime: %d day(s), %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs);
  15. #elif LANG_RUS
  16.         printf ("  Uptime: %d ¤­¥©, %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs);
  17. #endif
  18. return TRUE;
  19. }