• L
    bt: remove muldiv64() · fdfea124
    Laurent Vivier 提交于
    Originally, timers were ticks based, and it made sense to
    add ticks to current time to know when to trigger an alarm.
    
    But since commit:
    
    74475455 change all other clock references to use nanosecond resolution accessors
    
    All timers use nanoseconds and we need to convert ticks to nanoseconds.
    
    As get_ticks_per_sec() is 10^9,
    
        a = muldiv64(b, get_ticks_per_sec(), 100);
        y = muldiv64(x, get_ticks_per_sec(), 1000000);
    
    can be converted to
    
        a = b * 10000000;
        y = x * 1000;
    Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
    Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
    fdfea124
hci.c 68.4 KB