flat assembler
Message board for the users of flat assembler.

Index > Windows > Delay help needed

Author
Thread Post new topic Reply to topic
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 13 Aug 2004, 14:02
Hi.
How can i make 1-2 sec delay on my fasm prog on windows?

ty.
Post 13 Aug 2004, 14:02
View user's profile Send private message Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 13 Aug 2004, 14:15
Use Sleep
Post 13 Aug 2004, 14:15
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 13 Aug 2004, 18:03
I debugged some code and saw that calling Sleep makes it call SleepEx so
its a bit useless. Its better calling SleepEx with additional default parameters
so you won't get calling and returning overhead.
invoke Sleep, 1000 ;Shorter by 2bytes
invoke SleepEx, 1000, 0 ;Shorter by 5-10clocks
Post 13 Aug 2004, 18:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 13 Aug 2004, 19:54
by the way, Sleep is accurate only with values above 9 ms or so.
Post 13 Aug 2004, 19:54
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 13 Aug 2004, 21:47
I think that 1-2sec delay is above that limit, but this is not why it is not
accurate: Sleep is an idle event and the limit can be checked only for some
times per second so if you have million threads, the Sleep is not at all
accurate, because checking against limits will not happen very often and
you are not guaranteed to get back from Sleep in the specified time, rather
a few milliseconds later when TimePassed>Limit is definately true.
Post 13 Aug 2004, 21:47
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
holdlang



Joined: 10 Aug 2004
Posts: 11
holdlang 13 Aug 2004, 22:19
thx for the help i't works fine.

But.. I have another question ^^""

How can i use tab control in fasm? I't dont work at all. I made one simple tabcontrol vith visual studio. I load it with my prog and i't not work at all.

Any idea?

Thx for the help Smile

Oh and one more.. How can i sett to my richtext textbox to change it size when I maximize the whindow?
Post 13 Aug 2004, 22:19
View user's profile Send private message Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 14 Aug 2004, 04:23
For your last question, handle WM_SIZE or some relevant messages and call MoveWindow
Post 14 Aug 2004, 04:23
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 14 Aug 2004, 09:50
For your first one, please be more specific! What did you make in Visual Studio (exe, bin) and was the problem running the exe or using bin with FASM? If you could show us the tab control in FASM that does NOT work it would be helpful also
Post 14 Aug 2004, 09:50
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.