Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  program editing →  Testing and Checking Programs →  Runtime Measurement 

SET RUN TIME CLOCK RESOLUTION

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SET RUN TIME CLOCK RESOLUTION {HIGH|LOW}. 

Effect

This statement specifies the precision with which the GET RUN TIME statement is measured. You can only change it in a program before the GET RUN TIME statement is executed for the first time, otherwise an uncatchable exception will occur.

When you select HIGH, the system uses the level of precision of one microsecond. If the level of precision is high, this can result in incorrect time values for multi-processors as the clocks of the individual processors are not always regularly synchronized on all platforms. The high level of precision on the following platforms always returns correct values:

  • AIX
  • SINIX
  • SUN-OS
  • Linux
  • IBM i5/OS (previously OS/400)
  • Windows NT

To avoid incorrect time values on the other platforms, you can use LOW to specify a low precision measurement whose resolution depends on each platform.

Without the above SET RUN TIME CLOCK RESOLUTION statement, GET RUN TIME implicitly uses the high precision measurement.


Notes

To execute several measurements with different levels of precision within an internal mode, the class CL_ABAP_RUNTIME is available (see class for runtime measurements).

  • No exception occurs if SET RUN TIME CLOCK RESOLUTION is used after a GET RUN TIME statement as long as the level of precision is not changed.

Exceptions


Non-Catchable Exceptions

  • Cause:An attempt was made to change the level of precision after GET RUN TIME using SET RUN TIME CLOCK RESOLUTION.
    Runtime Error: SET_RUN_TIME_CLOCK_ERROR