Solved

putting a small delay in my program....

Posted on 2000-04-23
4
358 Views
Last Modified: 2006-11-17
hi,
this is an easy question but please bear with me. i have a simple while loop, all i want to do is put a delay in it of about 10 milli seconds. in C i would use the "delay" function or sleep or usleep. how do i do this in delphi?
0
Comment
Question by:twilight_prince
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
ptmcomp earned 30 total points
ID: 2741471
Just use Sleep(10). (It uses the unit windows.pas. The delay does not use cpu time, the 10 mili seconds are free for other tasks.)
ptm.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2741512
you are very fast ptm,
yes it is Sleep(10);

Motaz
0
 

Author Comment

by:twilight_prince
ID: 2741534
thanks a lot ptm. i actually looked in the help files for sleep, usleep, delay and all the others, didn't find anything there. where is the documentation for all of them?
0
 
LVL 10

Expert Comment

by:ptmcomp
ID: 2741947
You can find the documentation in Win32.hlp. I suggest to activate the full text index.
Regards, ptm.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
code issue 8 153
Using idhttp to login to instagram 2 106
JAudiorecorder record freezing the app 29 74
Twebbrowser add css to the header 3 27
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question