08-02-2010 03:24 PM
Is it necessary to manually calculate the following?
If not, where are these results available within TestStand?
I would like to store the sequence absolute timestamp (from Windows), execution elapsed time, and step duration at the completion of a step. What is the proper callback to use for this?
I found the Engine.SecondsSinceStart property, but this does not correlate with the start of an execution. This only correlates to when the TestStand Engine was launched, not when the Sequence was started.
Any advice would be appreciated.
Solved! Go to Solution.
08-03-2010 11:23 AM
You can get the execution start time using RunState.Root.Locals.StartTime.Text (Note the StartTime object is a container with several start time formats).
Each step result has a TS container, and in that there is the [Result.]TS.StartTime and [Result.]TS.TotalTime for each step that records. The TS.StartTime is based on the time that the engine was started, so you'd need to do some calculations to tie the step start times to the execution start time assuming that's what you need to do.
The callback best suited to handling the time information is to enable On-The-Fly Reporting and then use the ProcessModelPostResultListEntry callback to handle the time actions you require. If you don't want to muck with the process model, you can use the SequenceFilePostResultListEntry callback for the calls in that sequence file.
-Jack
08-04-2010 09:56 AM
Thanks for the response.
Capt. Jack wrote:
Each step result has a TS container, and in that there is the [Result.]TS.StartTime and [Result.]TS.TotalTime for each step that records. The TS.StartTime is based on the time that the engine was started, so you'd need to do some calculations to tie the step start times to the execution start time assuming that's what you need to do.
-Jack
It seems the TestStand Time functions will output a string in the localized format and require variable creation to access a timestamp in the numeric format
How can the Engine.StartTime and Execution.StartTime be converted to the same format? It seem if one could obtain the Execution.StartTime in seconds, this would be the most direct calculation. However, I don't see an easy way to do this.
08-05-2010 08:06 AM
I did a little digging and there's an Execution.SecondsAtStart Property that you could link to the StartTime. This might be what you need to calculate the times you're looking for.
-Jack
08-05-2010 09:50 AM
Thanks for the digging, it appears I need a better shovel. I did a summary of relative timing information from our discussion:
Relative Time
Absolute Time Conversion