SAP SET RUN TIME CLOCK RESOLUTION ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID SET-RUN-TIME
• SET RUN TIME CLOCK RESOLUTION ABAP Statement
• HIGH SET RUN TIME CLOCK RESOLUTION
• LOW SET RUN TIME CLOCK RESOLUTION

SET RUN TIME CLOCK RESOLUTION
Short Reference

ABAP_SYNTAX
SET RUN TIME CLOCK RESOLUTION ${HIGH$|LOW$}.

What does it do?
This statement specifies the measurement precision for the statement GET RUN TIME. It can be changed in a program only before the statement GET RUN TIME is executed for the first time, otherwise an uncatchable exception is raised.
Specifying HIGH defines a measurement precision of one microsecond. If the level of precision is high, this can produce false time values for multiprocessors, since 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
To avoid incorrect time values on the other platforms, LOW can be used to specify a low precision measurement whose resolution depends on each platform.
Without the preceding statement SET RUN TIME CLOCK RESOLUTION , GET RUN TIME uses the high precision measurement implicitly.



Latest notes:

To execute multiple measurements with different levels of precision within an ABAP_ISESS , the class CL_ABAP_RUNTIME can be used (see Class for Runtime Measurements).
No exception is raised if SET RUN TIME CLOCK RESOLUTION is used after the statement GET RUN TIME, but the level of precision is not changed.
ABAP_HINT_END
BEGIN_SECTION SAP_INTERNAL_HINT
See SAP Notes 87447 and 20097.
END_SECTION SAP_INTERNAL_HINT



Example ABAP Coding

Use of SET RUN TIME CLOCK RESOLUTION in front of GET RUN TIME .
ABEXA 00660
ABAP_EXAMPLE_END



Runtime Exceptions


Non-catchable Exceptions
Reason for error:
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
ABAP_NONCAT_END

Return to menu