I'm writing a program that unable me to extract timing(time that i used to finish typing my password). When running my program, i need to shutdown/close all the background processes to prevent any delay whn i extract the time.
Any coding(C++ or C#) can help me to shutdown/close all the background processes when i running my program?
thx =)

Not a good idea. The better option would be to increase the priority of your program so it will pre-empt other processes that are running at a lower priority. From your question, I assume you are running Windows. With Linux this is trivial, by decreasing the 'nice' factor of your program. Not sure how to do that programmatically with Windows... Sorry.