Hi,
i am deleting over 2000 files in a for loop, everything works ok except that the CPU usage is 100 % during this loop. Here is the Code:
Code:for( size_t i = 0; i < filesO.GetCount(); i++ ) { DeleteFile( filesO.Item( i ) ); }
How can i prevent increased CPU usage? i have seen programs doing the same thing but the CPU usage remains under 20%.
Is it there a way to do that without using sleep functions?
Thanks in advance.