org.openqa.selenium.support.ui
Class SystemClock

java.lang.Object
  extended by org.openqa.selenium.support.ui.SystemClock
All Implemented Interfaces:
Clock

public class SystemClock
extends Object
implements Clock


Constructor Summary
SystemClock()
           
 
Method Summary
 boolean isNowBefore(long endInMillis)
          Tests if a point in time occurs before the current time.
 long laterBy(long durationInMillis)
          Computes a point of time in the future.
 long now()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemClock

public SystemClock()
Method Detail

laterBy

public long laterBy(long durationInMillis)
Description copied from interface: Clock
Computes a point of time in the future.

Specified by:
laterBy in interface Clock
Parameters:
durationInMillis - The point in the future, in milliseconds relative to the current time.
Returns:
A timestamp representing a point in the future.

isNowBefore

public boolean isNowBefore(long endInMillis)
Description copied from interface: Clock
Tests if a point in time occurs before the current time.

Specified by:
isNowBefore in interface Clock
Parameters:
endInMillis - The timestamnp to check.
Returns:
Whether the given timestamp represents a point in time before the current time.

now

public long now()
Specified by:
now in interface Clock
Returns:
The current time in milliseconds since epoch time.
See Also:
System.currentTimeMillis()


Copyright © 2011. All Rights Reserved.