*
* Returns: Current system timer ticks count with unspecified base.
* You will want to subtract two such values to get some timing result.
+ * libcaptive must return #gint64 instead of the official #LARGE_INTEGER
+ * as W32 expects it as value in EAX:EDX but GCC returns the structure address in EAX.
*/
-LARGE_INTEGER KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
+gint64 /* instead of LARGE_INTEGER */ KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
{
LARGE_INTEGER r;
struct timeval tv;
if (PerformanceFreq)
PerformanceFreq->QuadPart=1000000;
- return r;
+ return r.QuadPart;
}