public void main() { ... bool run = true; // to control the exit from the loops Task.Factory.StartNew(()=>{ while(run) { ... // your code here Thread.Sleep(10);// sleep for 10ms } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)