Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Faster then 1 miliseconds

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 73

PostPosted: Mon Oct 17, 2016 10:56 pm    Post subject: Faster then 1 miliseconds Reply with quote

Hi all

How can i use microseconds in thread
For example i want use 100 microseconds

Code:
[Enable]
alloc(PLACEpotok,1000)
createthread(PLACEpotok)

alloc(Potoc_Control,8)
registersymbol(Potoc_Control)

alloc(Timer,8)
registersymbol(Timer)

alloc(Value,8)
registersymbol(Value)

label(Potoc_Increase)
label(Potoc_Decrease)
label(Potoc_End)

PLACEpotok:
push [Timer]
call sleep

cmp [Potoc_Control],#0
je PLACEpotok
cmp [Potoc_Control],#1
je Potoc_Increase
cmp [Potoc_Control],#2
je Potoc_Decrease
cmp [Potoc_Control],#3
je Potoc_End
jmp PLACEpotok


Potoc_Increase:
push eax
mov eax,[Value]
inc eax
mov [Value],eax
pop eax
jmp PLACEpotok

Potoc_Decrease:
push eax
mov eax,[Value]
dec eax
mov [Value],eax
pop eax
jmp PLACEpotok



Potoc_End:
call RtlExitUserThread

Timer:
dd #1

[Disable]
Potoc_Control:
dd #3
dealloc(PLACEpotok)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25287
Location: The netherlands

PostPosted: Tue Oct 18, 2016 4:02 am    Post subject: Reply with quote

read
http://stackoverflow.com/questions/85122/how-to-make-thread-sleep-less-than-a-millisecond-on-windows


anyhow, , use a time of 0, that way the scheduler will requeue it so it opens up some cycles for other threads to run.


alternatively use queryperformancecounter and actively poll the time(will eat your cpu)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 73

PostPosted: Tue Oct 18, 2016 7:40 am    Post subject: Reply with quote

Dark Byte wrote:
read
http://stackoverflow.com/questions/85122/how-to-make-thread-sleep-less-than-a-millisecond-on-windows


anyhow, , use a time of 0, that way the scheduler will requeue it so it opens up some cycles for other threads to run.


alternatively use queryperformancecounter and actively poll the time(will eat your cpu)


Ok, understand, thanks.
It dificult for me, so i can only use 1 milisecond.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites