org.alfresco.webdrone
Class RenderTime

java.lang.Object
  extended by org.alfresco.webdrone.RenderTime

public class RenderTime
extends Object

An Object to measure time left for the operation to complete. Every operation takes the time left to complete and deducts the time spent from the total time. The RenderTime is used to determine if different elements on the HTML page have completed in a timely manner. Each page object has a render method that check if the page has rendered. The check takes the total time limit and for every element it check it passes the time left for it before it runs out of time.

Since:
1.0
Author:
Michael Suzuki

Constructor Summary
RenderTime(long maxWait)
          RenderTime constructor that take maxWait time in milliseconds.
RenderTime(long maxWait, TimeUnit unit)
           
 
Method Summary
 void end()
           
 void start()
           
 long timeLeft()
          The time left in milliseconds.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderTime

public RenderTime(long maxWait,
                  TimeUnit unit)

RenderTime

public RenderTime(long maxWait)
RenderTime constructor that take maxWait time in milliseconds.

Parameters:
maxWait - long wait in millisecond
Method Detail

timeLeft

public long timeLeft()
The time left in milliseconds.


start

public void start()

end

public void end()
         throws PageRenderTimeException
Throws:
PageRenderTimeException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.