openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/utils.c
double nl_cancel_down_us(uint32_t l, char** unit)
{
    if (l >= 1000000)
    {
        *unit = "s";
        return ((double)l) / 1000000;
    }
    else if (l >= 1000)
    {
        *unit = "ms";
        return ((double)l) / 1000;
    }
    else
    {
        *unit = "us";
        return (double)l;
    }
}
/**
 * Cancel down a micro second value
 * @arg	l		micro seconds
 * @arg unit		destination unit pointer
 *
 * Cancels down a microsecond counter until it reaches a
 * reasonable unit. The chosen unit is assigned to \a unit.
 *
 * @return The cancelled down microsecond in the new unit
 */
Cancel down a micro second value
@arg l               micro seconds
@arg unit            destination unit pointer

Cancels down a microsecond counter until it reaches a
reasonable unit. The chosen unit is assigned to \a unit.

@return The cancelled down microsecond in the new unit
Cancel down a micro second value @arg l micro seconds @arg unit destination unit pointer Cancels down a microsecond counter until it reaches a reasonable unit . The chosen unit is assigned to \ a unit . @return The cancelled down microsecond in the new unit
double nl_cancel_down_us(uint32_t l, char** unit)
{
    if (l >= 1000000)
    {
        *unit = "s";
        return ((double)l) / 1000000;
    }
    else if (l >= 1000)
    {
        *unit = "ms";
        return ((double)l) / 1000;
    }
    else
    {
        *unit = "us";
        return (double)l;
    }
}
double nl_cancel_down_us ( uint32_t l , char * * unit ) { if ( l >= 1000000 ) { * unit = " " ; return ( ( double ) l ) / 1000000 ; } else if ( l >= 1000 ) { * unit = " " ; return ( ( double ) l ) / 1000 ; } else { * unit = " " ; return ( double ) l ; } }
Cancel down a micro second value
 @arg l               micro seconds
 @arg unit            destination unit pointer
Cancel down a micro second value @arg l micro seconds @arg unit destination unit pointer