Changes in uspace/app/top/top.c [d76a329:1ab8539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/top/top.c
rd76a329 r1ab8539 156 156 /* Get current time */ 157 157 struct timeval time; 158 if (gettimeofday(&time, NULL) != EOK) 159 return "Cannot get time of day"; 158 gettimeofday(&time, NULL); 160 159 161 160 target->hours = (time.tv_sec % DAY) / HOUR; … … 164 163 165 164 /* Get uptime */ 166 sysarg_t uptime = stats_get_uptime(); 167 target->udays = uptime / DAY; 168 target->uhours = (uptime % DAY) / HOUR; 169 target->uminutes = (uptime % HOUR) / MINUTE; 170 target->useconds = uptime % MINUTE; 165 struct timeval uptime; 166 getuptime(&uptime); 167 168 target->udays = uptime.tv_sec / DAY; 169 target->uhours = (uptime.tv_sec % DAY) / HOUR; 170 target->uminutes = (uptime.tv_sec % HOUR) / MINUTE; 171 target->useconds = uptime.tv_sec % MINUTE; 171 172 172 173 /* Get load */
Note:
See TracChangeset
for help on using the changeset viewer.