Example #1
0
 public MemoryMonitor(string targeProcess, int pid)
 {
     mStopRequest   = false;
     mMonitorStop   = false;
     mTragetProcess = new ProcessData(targeProcess, pid);
     mCounter       = new PerformanceCounter("Process", "Working Set", true);
     mCounterTime   = new PerformanceCounter("Process", "Elapsed Time", true);
 }
Example #2
0
 public CPUMonitor(string targeProcess, int pid)
 {
     mStopRequest   = false;
     mLastUpdatTime = DateTime.Now;
     mTragetProcess = new ProcessData(targeProcess, pid);
     mCounter       = new PerformanceCounter("Process", "% Processor Time", true);
     mCounterTime   = new PerformanceCounter("Process", "Elapsed Time", true);
 }