Changeset 9696b01 in mainline for uspace/lib/c/generic/stats.c
- Timestamp:
- 2014-11-14T17:25:28Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1ab8539
- Parents:
- a047aaa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stats.c
ra047aaa r9696b01 316 316 void stats_print_load_fragment(load_t upper, unsigned int dec_length) 317 317 { 318 /* Magic value from BSD */319 load_t lower = 65536;320 321 318 /* Print the whole part */ 322 printf("%u.", upper / lower);323 324 load_t rest = (upper % lower) * 10;319 printf("%u.", upper / LOAD_UNIT); 320 321 load_t rest = (upper % LOAD_UNIT) * 10; 325 322 326 323 unsigned int i; 327 324 for (i = 0; i < dec_length; i++) { 328 printf("%u", rest / lower);329 rest = (rest % lower) * 10;325 printf("%u", rest / LOAD_UNIT); 326 rest = (rest % LOAD_UNIT) * 10; 330 327 } 331 328 }
Note:
See TracChangeset
for help on using the changeset viewer.