Partager via


TimerResult.Duration Property

Gets or sets the time interval for the timer.

Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

Syntax

'Declaration
Public Property Duration As TimeSpan
public TimeSpan Duration { get; set; }
public:
property TimeSpan Duration {
    TimeSpan get ();
    void set (TimeSpan value);
}
member Duration : TimeSpan with get, set
function get Duration () : TimeSpan 
function set Duration (value : TimeSpan)

Property Value

Type: TimeSpan
The time interval.

Remarks

Use Zero when the elapsed time is less than zero to prevent the report of a negative duration.

.NET Framework Security

See Also

Reference

TimerResult Class

Microsoft.VisualStudio.TestTools.Common Namespace

TimeSpan