Table of Contents

Class ReportTimer

Namespace
CSF.Screenplay.Reporting
Assembly
CSF.Screenplay.dll

Default implementation of IMeasuresTime which uses a Stopwatch.

public sealed class ReportTimer : IMeasuresTime, IDisposable
Inheritance
ReportTimer
Implements
Inherited Members

Methods

BeginTiming()

Begins the timer, recording/tracking time.

public DateTimeOffset BeginTiming()

Returns

DateTimeOffset

The current date & time, at the point when timing began.

Exceptions

InvalidOperationException

If this method is used more than once upon the same object instance.

Dispose()

public void Dispose()

GetCurrentTime()

Gets the amount of time (wall clock time) which has elapsed since BeginTiming() was executed.

public TimeSpan GetCurrentTime()

Returns

TimeSpan

A timespan which is the time elapsed since timing began.

Exceptions

InvalidOperationException

If this method is used before BeginTiming() has been executed.