Operator Reference

count_secondscount_secondsCountSecondsCountSecondscount_seconds (Operator)

count_secondscount_secondsCountSecondsCountSecondscount_seconds — Passed Time.

Signature

count_seconds( : : : Seconds)

Herror count_seconds(double* Seconds)

Herror T_count_seconds(Htuple* Seconds)

void CountSeconds(HTuple* Seconds)

static double HSystem::CountSeconds()

static void HOperatorSet.CountSeconds(out HTuple seconds)

static double HSystem.CountSeconds()

def count_seconds() -> float

Description

The operator count_secondscount_secondsCountSecondsCountSecondscount_seconds helps to measure time. Each operator call returns a time value. The difference of the values of two successive calls provides the time interval in seconds. The mode of measuring time can be set with set_system('clock_mode',...)set_system("clock_mode",...)SetSystem("clock_mode",...)SetSystem("clock_mode",...)set_system("clock_mode",...).

Attention

The time measurement is not exact and depends on the load of the computer.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

SecondsSecondsSecondssecondsseconds (output_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Process time since the program start.

Example (HDevelop)

count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start

Example (C)

count_seconds(&Start);
/* program segment to be measured */
count_seconds(&End);
printf("RunTime = %g\n",End-Start);

Example (HDevelop)

count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start

Example (HDevelop)

count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start

Result

The operator count_secondscount_secondsCountSecondsCountSecondscount_seconds always returns the value 2 ( H_MSG_TRUE) .

See also

set_systemset_systemSetSystemSetSystemset_system

Module

Foundation