Table of Contents

Interface IClock

Namespace
OpenQA.Selenium.Support.UI
Assembly
WebDriver.dll

An interface describing time handling functions for timeouts.

public interface IClock

Properties

Now

Gets the current date and time values.

DateTime Now { get; }

Property Value

DateTime

Methods

IsNowBefore(DateTime)

Gets a value indicating whether the current date and time is before the specified date and time.

bool IsNowBefore(DateTime otherDateTime)

Parameters

otherDateTime DateTime

The date and time values to compare the current date and time values to.

Returns

bool

true if the current date and time is before the specified date and time; otherwise, false.

LaterBy(TimeSpan)

Gets the DateTime at a specified offset in the future.

DateTime LaterBy(TimeSpan delay)

Parameters

delay TimeSpan

The offset to use.

Returns

DateTime

The DateTime at the specified offset in the future.