Browse Source

Show how long decompilation of whole assembly took.

pull/37/head
David Srbecký 15 years ago
parent
commit
377ec99c43
  1. 5
      ILSpy/TextView/DecompilerTextView.cs

5
ILSpy/TextView/DecompilerTextView.cs

@ -419,6 +419,8 @@ namespace ICSharpCode.ILSpy.TextView
Thread thread = new Thread(new ThreadStart( Thread thread = new Thread(new ThreadStart(
delegate { delegate {
try { try {
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
using (StreamWriter w = new StreamWriter(fileName)) { using (StreamWriter w = new StreamWriter(fileName)) {
try { try {
DecompileNodes(context, new PlainTextOutput(w)); DecompileNodes(context, new PlainTextOutput(w));
@ -428,8 +430,9 @@ namespace ICSharpCode.ILSpy.TextView
throw; throw;
} }
} }
stopwatch.Stop();
AvalonEditTextOutput output = new AvalonEditTextOutput(); AvalonEditTextOutput output = new AvalonEditTextOutput();
output.WriteLine("Decompilation complete."); output.WriteLine("Decompilation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds.");
output.WriteLine(); output.WriteLine();
output.AddButton(null, "Open Explorer", delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); }); output.AddButton(null, "Open Explorer", delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); });
output.WriteLine(); output.WriteLine();

Loading…
Cancel
Save