EndTime Property (ATask)

Version 7, 2024/v13

Returns the time that this task ended.

Syntax

 [ dateEnd = ] Object.EndTime

The EndTime property syntax has the following parts:

 

Name

Type

Description

Object

ATask

ATask object

dateEnd

DateTime

A floating number (Double) specifying the time that this task ended.

Comments

EndTime is the time after test get executed before all OnEndTask events were called.

In ATEasy 2024/v13 this property was updated to return the time accurate to 100 nSec from 1 Sec in earlier versions.

Use the FormatLogString with aFormatLogAddDuration to display the task in the test log (ATEasy 2024/v13).

Example

The following code is OnEndTask event of the program, which prints the time taken for each task:

 

Procedure OnEndTask(): Void Public Compile ! Occurs after a program task has completed.

--------------------------------------------------------------------------------

s: String

d: Double

dtmOneSec: DateTime = "12:00:01 AM"

{

if Task.EndTime=Task.StartTime

print "Time taken for this task : less than one sec."

else

d=(Task.EndTime-Task.StartTime)/dtmOneSec

print "Time taken for this task : "; Format(d, "9") + " sec"

endif

}

Applies to

ATask

See Also

StartTime, DataTime data type, SDate, STime, FormatDateTime,  ParseDateTime, VarChangeType