flat assembler
Message board for the users of flat assembler.

Index > Windows > ..

Author
Thread Post new topic Reply to topic
pool



Joined: 08 Jan 2007
Posts: 97
pool 28 Aug 2008, 02:26
..


Last edited by pool on 17 Mar 2013, 12:05; edited 1 time in total
Post 28 Aug 2008, 02:26
View user's profile Send private message Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack 28 Aug 2008, 03:23
Sleep is not a counter, it's a 'pause' in your code execution
msdn wrote:
Suspends the execution of the current thread until the time-out interval elapses.

Code:
invoke Sleep,1000 ;pause for 1000msec or 1sec    


GetTickCount can be used as a 'counter'
msdn wrote:
Retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days.

Code:
Call [GetTickCount] ;x
mov esi,eax
...
...
Call [GetTickCount] ;y
sub eax,esi ;eax has the time (in msec) that was needed to execute the code between x and y
    


i wish someone could explain me music theory so good.. Smile
Post 28 Aug 2008, 03:23
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 28 Aug 2008, 06:04
There is QueryPerformanceCounter (and QueryPerformanceFrequency). The high-resolution performance counter gives more accurate and faster timing than the tick counter.
Post 28 Aug 2008, 06:04
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.