/* Un-comment this if you require more accurate timing for profiling purposes
/// Retrieves a timestamp using an x86-specific CPU counter. Note that because we are dividing by a fixed number instead of the actual CPU frequency, the result doesn't represent real-world units, but it can still be used to obtain accurate relative timing for profiling.
inline double nanotime()
{
#if defined K3D_HAVE_X86
unsigned long long int val;
__asm__ __volatile__("rdtsc" : "=A" (val) : );
return static_cast<double>(val) / 1000000000.0;
#endif
}
*/
#ifdef K3D_API_WIN32
/// Retrieves a timestamp in seconds using the Win32 high performance counters
/// Measures elapsed time using a high-resolution timer, printing the results to a stream on destruction. Intentionally modelled on boost::progress_timer