Hello,
I am trying to write a program that will fetch the amount of memory used by a process on a pc and write it to a text file. I have done this with the help of the
System.Diagnostics library, the problem is that I want the program to execute continuously (it should not stop). What is the best way that this can be done ?.
I have already tried the following
1) Infinite for loop (not efficient as it consumes all the cpu)
2) Writing the functionality as a windows service (again not efficient as the service starts, executes the code once and since it does not have anything else to do , it just stands there and does nothing)
Any code examples would be of great help ..
Cheers
Jaic