|
-
Jul 24th, 2007, 03:12 PM
#1
Thread Starter
New Member
[2.0] Delay/Wait programmatically
Ok, this is very simple, but I can't figure it out...I want to do one command, wait for x milliseconds then continue on. I do NOT want to use Thread.Sleep because I need the application to be able to do other things during that time...here's how I COULD do it but it's very difficult when you want to do it hundreds of times at different intervals...
//task number1
Timer timer1 = new Timer();
timer1.Interval = 1000;
timer1.enabled=true;
timer1.tick+=new blah blah
//
timer1_Tick(object sender, eventargs e)
{
//task number2
timer1.enabled=false;
}
But I'd like to do it easier, something like this:
//task number1
Delay 1000;
//task number2
if you don't understand...i'll clear it up more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|