NLMISC_CTime_ticksToSecond_fix_mac_os_x.patch
| b/code/nel/src/misc/time_nl.cpp Wed May 12 11:14:08 2010 +0200 | ||
|---|---|---|
| 222 | 222 |
else |
| 223 | 223 |
#elif defined(NL_OS_MAC) |
| 224 | 224 |
{
|
| 225 |
static mach_timebase_info_data_t tbInfo; |
|
| 226 |
if(tbInfo.denom == 0) mach_timebase_info(&tbInfo); |
|
| 227 |
return double(ticks * tbInfo.numer / tbInfo.denom)/1000000.0; |
|
| 225 |
static double factor = 0.0; |
|
| 226 |
if (factor == 0.0) |
|
| 227 |
{
|
|
| 228 |
mach_timebase_info_data_t tbInfo; |
|
| 229 |
factor = 1000000000.0 * (double)tbInfo.numer / (double)tbInfo.denom; |
|
| 230 |
} |
|
| 231 |
return double(ticks * factor); |
|
| 228 | 232 |
} |
| 229 | 233 |
#endif // NL_OS_WINDOWS |
| 230 | 234 |
{
|