Results 1 to 3 of 3

Thread: [RESOLVED]Need help delaying code execution

Threaded View

  1. #1

    Thread Starter
    Member nci's Avatar
    Join Date
    Aug 2003
    Posts
    43

    Resolved [RESOLVED]Need help delaying code execution

    hello, i was wondering...
    how do i suspend code execution for a few milliseconds when using a backgroundworker?

    Code:
            private void Core_DoWork(object sender, DoWorkEventArgs e)
            {
                uint iTime=0;
                int iLoop = 0;
    
                while (iLoop == 0)
                {
                    if (FMODSound != null)
                    {
                        FMODChannel.getPosition(ref iTime, FMOD.TIMEUNIT.MS);
                        SetTime((int)iTime / 1000);
                    }
    
                    //need something to suspend the code for a bout 500ms
                    //{EDIT}
                    //I had to manually put using System.Threading; and make a call
                    //to:
                    System.Threading.Thread.Sleep(500);
    
                }
            }
    thanks for any help


    nevermind, i figured it out, thanks tho
    Last edited by nci; Oct 26th, 2007 at 08:31 PM. Reason: Solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width