Profiler.Reset C# (CSharp) Method

Reset() public method

public Reset ( ) : void
return void
    public void Reset()
    {
        Watch.Reset ();
    }

Usage Example

コード例 #1
0
        public void TestWithMarkers()
        {
            Profiler.Reset();
            const int timeToWait = 10;

            var watcher = ExpectLog(new List <MatchMessageDelegate>()
            {
                MessageStartWith("[Profiler] #0: Begin: TestProfiler.Test"),
                MessageStartWith("[Profiler] #0: Mark: TestProfiler.Test", timeToWait),
                MessageStartWith("[Profiler] #0: Mark: TestProfiler.Test", timeToWait * 2),
                MessageStartWith("[Profiler] #0: End: TestProfiler.Test", timeToWait * 2),
            });

            {
                Profiler.EnableAll();
                using (var profile = Profiler.Begin(TestKey))
                {
                    Utilities.Sleep(timeToWait);
                    profile.Mark();

                    Utilities.Sleep(timeToWait);
                    profile.Mark();
                }
            }
            watcher.Finish();
        }
All Usage Examples Of Profiler::Reset