Changeset 9696b01 in mainline for uspace/lib/c/generic/stats.c


Ignore:
Timestamp:
2014-11-14T17:25:28Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ab8539
Parents:
a047aaa
Message:

adapt the barber pole frame rate in the range of 1 to 25 fps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/stats.c

    ra047aaa r9696b01  
    316316void stats_print_load_fragment(load_t upper, unsigned int dec_length)
    317317{
    318         /* Magic value from BSD */
    319         load_t lower = 65536;
    320        
    321318        /* 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;
    325322       
    326323        unsigned int i;
    327324        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;
    330327        }
    331328}
Note: See TracChangeset for help on using the changeset viewer.