IAlgorithmCalculationResult.TotalElapsedMilliseconds

Syntax

TotalElapsedMilliseconds: Integer;

None;

Description

The TotalElapsedMilliseconds property determines a total algorithm calculation time.

Example

Executing the example requires that the repository contains a ready calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contains configured objects.

Add a link to the Calculation Algorithm Core custom assembly contained in the Calculation Algorithms component, and links to the Algo, Metabase system assemblies.

Sub UserProc;
Var
    
MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
    CalcAlgo: ICalcAlgorithm;
    CalcResult: IAlgorithmCalculationResult;
    Sec: Double;
Begin
    MB := MetabaseClass.Active;
    
// Get calculation algorithm
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, 
True);
    CalcAlgo := Algo 
As ICalcAlgorithm;
    
// Calculate algorithm
    CalcResult := CalcAlgo.Calculate;
    
// Display calculation result in the console
    Sec := CalcResult.TotalElapsedMilliseconds/1000;
    Debug.WriteLine(
"Total time of calculation algorithm execution: " + Sec.ToString + " sec");
    Sec := CalcResult.InitMilliseconds/
1000;
    Debug.WriteLine(
"Initialization time: " + Sec.ToString + " sec");
    Sec := CalcResult.ElapsedMilliseconds/
1000;
    Debug.WriteLine(
"Objects calculation time: " + Sec.ToString + " sec");
End Sub UserProc;

Not provisioned.

After executing the example, the calculation algorithm is calculated. The console displays the calculation result, for example:

Total time of calculation algorithm execution: 0.078 sec

Initialization time: 0.031 sec

Objects calculation time: 0.031 sec

See also:

IAlgorithmCalculationResult