|
From: Jean-Dominique B. <jea...@fr...> - 2005-11-23 21:59:38
|
I need to measure time to get an idea of the time percentage spent in the different parts of my program.
In a recent message (see below), the API fxgetticks() was mentionned, but only under gcc.
Is there a solution under WinXP + VC++6.0 ?
Actually, i tried it but linking fails with the following error :
error LNK2001: unresolved external symbol "__int64 __cdecl fxgetticks(void)" (?fxgetticks@@YA_JXZ)
Any idea on how to get it working ?
Jean-Do
On Wednesday 26 October 2005 08:05 am, Robert W. Kuhn wrote:
>> Hello,
>>
>> is there something to measure how much a operation take?
>> Like
>>
>> clock_t start = clock();
>>
>> DoSomething();
>>
>> clock_t end = clock();
>> double dif = double(end-start)/CLK_TCK;
>> printf("The operation took %lf sec)", dif);
>
>
The API fxgetticks() returns the CPU clock ticks taken in an operation.
Its not a formal API, so first you have to declare it:
extern FXlong fxgetticks();
Before you can use it.
This function is supported and tested on x86 and x86-64 (GCC) only.
- Jeroen
|