##// END OF EJS Templates
Added IObservable to TraceRegistry
Added IObservable to TraceRegistry

File last commit:

r286:67ebcfd7d1c8 v3
r288:90cef6117ced v3
Show More
LogicalOperation.cs
26 lines | 647 B | text/x-csharp | CSharpLexer
cin
Implab.Diagnostics drafts
r253 using System;
cin
Working on Implab.Diagnostics
r286 using Stopwatch = System.Diagnostics.Stopwatch;
cin
Implab.Diagnostics drafts
r253
namespace Implab.Diagnostics {
public class LogicalOperation {
cin
Working on Implab.Diagnostics
r286 readonly Stopwatch m_stopwatch;
cin
Implab.Diagnostics drafts
r253
public string Name { get; private set; }
internal LogicalOperation(string name) {
Name = string.IsNullOrEmpty(name) ? "<unnamed>" : name;
cin
Working on Implab.Diagnostics
r286 m_stopwatch = Stopwatch.StartNew();
}
public TimeSpan Elapsed {
get {
return m_stopwatch.Elapsed;
}
}
public void End() {
m_stopwatch.Stop();
cin
Implab.Diagnostics drafts
r253 }
public override string ToString() => Name;
}
}