| 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 |
mach_timebase_info(&tbInfo);
|
|
230 |
factor = 1000000000.0 * (double)tbInfo.numer / (double)tbInfo.denom;
|
|
231 |
}
|
|
232 |
return double(ticks / factor);
|
| 228 |
233 |
}
|
| 229 |
234 |
#endif // NL_OS_WINDOWS
|
| 230 |
235 |
{
|