Esempio n. 1
0
        public void SetObject(ProcessBase processX)
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            processX.Main();
            stopwatch.Stop();
            Times.Add(processX.ProcessName + ": " + stopwatch.ElapsedMilliseconds.ToString());
        }
Esempio n. 2
0
 public void SetObject(ProcessBase processX)
 {
     try
     {
         Stopwatch stopwatch = new Stopwatch();
         stopwatch.Start();
         processX.Main();
         stopwatch.Stop();
         Times.Add(processX.ProcessName + ": " + stopwatch.ElapsedMilliseconds.ToString());
     }
     catch (WebException ex)
     {
         string path    = Path.GetTempPath();
         string file    = "Error.log";
         string message = DateTime.Now + " " + ex.Message + "\r\n";
         File.AppendAllText(Path.Combine(path, file), message);
         Console.WriteLine(message);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }