A
asit
In my multi threaded application(windows), I have several infinite
loop(though it's not good to have...but I need them). Hence they eat
nearly 98% of CPU time(it shows in task manager).
I have decided to put a delay of 200 ms in the program. But
unfortunately my Compiler(Borland 5.5) is not providing any such
functionalities.
In my research, I found that many (lame) people put delay by putting
unnecessary instructions in the delay block....like this
void delay()
{
int i=0,j=10;
for(i=0;i<12345678;i++)
j *=j;
}
But it won't do my job. But I have found that by doing some kind of
signal handling, I can create my delay function.
Does such functionality is available in windows ????
How can I implement it ????
loop(though it's not good to have...but I need them). Hence they eat
nearly 98% of CPU time(it shows in task manager).
I have decided to put a delay of 200 ms in the program. But
unfortunately my Compiler(Borland 5.5) is not providing any such
functionalities.
In my research, I found that many (lame) people put delay by putting
unnecessary instructions in the delay block....like this
void delay()
{
int i=0,j=10;
for(i=0;i<12345678;i++)
j *=j;
}
But it won't do my job. But I have found that by doing some kind of
signal handling, I can create my delay function.
Does such functionality is available in windows ????
How can I implement it ????