external/libnogg/tools/nogg-benchmark.c
static double time_unit(void)
{
#if defined(__APPLE__)
    mach_timebase_info_data_t timebase_info;
    mach_timebase_info(&timebase_info);
    return timebase_info.numer / (1.0e9 * timebase_info.denom);
#elif defined(_WIN32)
    LARGE_INTEGER frequency_buf;
    QueryPerformanceFrequency(&frequency_buf);
    return 1.0 / frequency_buf.QuadPart;
#elif defined(__linux__)
    return 1.0e-9;
#else
    return 1.0;
#endif
}
/**
 * time_unit:  Return the unit of time represented by a difference of 1 in
 * timestamps returned by time_now().  Multiplying a difference of two
 * timestamps by this value will give a time interval in seconds.
 *
 * [Return value]
 *     Unit of time_now() timestamps, in seconds.
 */
Return the unit of time represented by a difference of 1 in
timestamps returned by time_now().  Multiplying a difference of two
timestamps by this value will give a time interval in seconds.

[Return value]
Unit of time_now() timestamps, in seconds.
Return the unit of time represented by a difference of 1 in timestamps returned by time_now () . Multiplying a difference of two timestamps by this value will give a time interval in seconds . [ Return value ] Unit of time_now () timestamps in seconds .
static double time_unit(void)
{
#if defined(__APPLE__)
    mach_timebase_info_data_t timebase_info;
    mach_timebase_info(&timebase_info);
    return timebase_info.numer / (1.0e9 * timebase_info.denom);
#elif defined(_WIN32)
    LARGE_INTEGER frequency_buf;
    QueryPerformanceFrequency(&frequency_buf);
    return 1.0 / frequency_buf.QuadPart;
#elif defined(__linux__)
    return 1.0e-9;
#else
    return 1.0;
#endif
}
static double time_unit ( void ) { #if defined ( __APPLE__ ) mach_timebase_info_data_t timebase_info ; mach_timebase_info ( & timebase_info ) ; return timebase_info . numer / ( 1.0e9 * timebase_info . denom ) ; #elif defined ( _WIN32 ) LARGE_INTEGER frequency_buf ; QueryPerformanceFrequency ( & frequency_buf ) ; return 1.0 / frequency_buf . QuadPart ; #elif defined ( __linux__ ) return 1.0e-9 ; #else return 1.0 ; #endif }
time_unit:  Return the unit of time represented by a difference of 1 in
 timestamps returned by time_now().
time_unit : Return the unit of time represented by a difference of 1 in timestamps returned by time_now () .