Re: [ANN] LuaProfiler 2.0
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANN] LuaProfiler 2.0
- From: Diego Nehab <diego@...>
- Date: 2005年6月14日 18:29:47 -0400 (EDT)
Hi,
Have you considered to use an RDTSC timer for intel platforms?
The code is in some ways more portable than times().
For win32
_int64 t;
#define RDTSC_TIMER(x) {__asm rdtsc __asm mov DWORD PTR [x],EAX
__asm mov DWORD PTR [x+4],EDX}
RDTSC_TIMER(t)
Or, you can use QueryPerformanceCounter, if you don't like __asm. If
you don't need that much precision, you can also use
GetSystemTimeAsFileTime.
[]s,
Diego.