package com.ericfeminella.diagnostics
{
/**
*
* Defines the contract for classes which are to provide an
* API which calculates the time of a code execution
*
*/
public interface IExecutable
{
/**
*
* Retrieves the total execution measurement based on the
* current <code>executionStartTime</code> and the current
* <code>executionStopTime</code>
*
* @return integer representing the total execution duration
*
*/
function getElapsedTime() : int;
/**
*
* Determines the total time (in milliseconds) which
* has elapsed for a specific <code>Execution</code>
*
* @return the total execution time in milliseconds
*
*/
function getExecutionTotalDuration() : int;
/**
*
* Starts the current execution measurements and sets the
* value of the <code>executionStartTime</code> property
* to the value of the current getTimer(); Flash Player
* call
*
* @return an integer representing the start time
*
*/
function start() : int;
/**
*
* Stops the current execution measurements and sets the
* value of the <code>executionStopTime</code> property
* to the value of the current getTimer(); Flash Player
* call
*
* @return an integer representing the stop time
*
*/
function stop() : int;
/**
*
* Retrieves the initial start time for the current
* <code>Execution</code> instance
*
* @return the start time in milliseconds
*
*/
function get startTime() : int;
/**
*
* Retrieves the initial start time for the current
* <code>Execution</code> instance
*
* @return the start time in milliseconds
*
*/
function get stopTime() : int;
}
}