nci
Oct 26th, 2007, 06:36 PM
hello, i was wondering...
how do i suspend code execution for a few milliseconds when using a backgroundworker?
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
how do i suspend code execution for a few milliseconds when using a backgroundworker?
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