Skip to content

count_secondsCountSecondsCountSecondscount_secondscount_seconds🔗

Short description🔗

count_secondsCountSecondsCountSecondscount_secondscount_seconds — Passed Time.

Signature🔗

count_seconds( out real Seconds )void CountSeconds( HTuple* Seconds )static void HOperatorSet.CountSeconds( out HTuple seconds )def count_seconds( ) -> float

Herror count_seconds( double* Seconds )

Herror T_count_seconds( Htuple* Seconds )

static double HSystem::CountSeconds( )

static double HSystem.CountSeconds( )

Description🔗

The operator count_secondsCountSeconds 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',...).

Attention🔗

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

Execution information🔗

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🔗

Secondssecondsseconds (output_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Process time since the program start.

Example🔗

(HDevelop)

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

Result🔗

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

Combinations with other operators🔗

Combinations

See also

set_systemSetSystem

Module🔗

Foundation