1. Get time difference without time() (solved) [INFO]

for info only:

I now get the replacement for time():

global function timer()
    if platform() = 2 then
return (c_func(define_c_func(open_dll("kernel32.dll"), "GetTickCount",
        {}, C_LONG), {})/1000)
    else
        return time()
    end if
end function

I got it from a VB mailing list.

It has 0.001 second accuracy, you can use it if you want.

new topic     » topic index » view message » categorize

2. Re: Get time difference without time() (solved) [INFO]

I use that routine all the time in Eu Vs C
benchmarks...
It returns the incremented CPU tick count every
millisecond.

Mike The Spike
PS. But beware, it resets to 0 after 40 days... !

--- aku at inbox.as wrote:
> 
>
> 
> for info only:
> 
> I now get the replacement for time():
> 
> global function timer()
>     if platform() = 2 then
>         return
> (c_func(define_c_func(open_dll("kernel32.dll"),
> "GetTickCount", {}, C_LONG), {})/1000)
>     else
>         return time()
>     end if
> end function
> 
> I got it from a VB mailing list.
> 
> It has 0.001 second accuracy, you can use it if you
> want.
> 
> 
> 
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Get time difference without time() (solved) [INFO]

Dear Mike:

> I use that routine all the time in Eu Vs C
> benchmarks...
> It returns the incremented CPU tick count every
> millisecond.

Be very careful with these benchmarks.

Multitasking distorts the results,
same about the exact delays.

Eu CE has no time profile under Win32 and Linux
just because of this reason.

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu