BeginTimer Method
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

TestContext.BeginTimer Method

When overridden in a derived class, begins a timer with the specified name.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.SmartDevice.UnitTestFramework (in Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll)

public abstract void BeginTimer(
	string timerName


Type: System.String

The name of the timer to begin.

A timer can be useful when a unit test is run in the context of a load test. In this case, the time between the calls to BeginTimer and EndTimer for a given timerName are reported as transaction times in the load test results.

© 2016 Microsoft