GET


Basic form 5

GET RUN TIME FIELD f.

Effect

Relative runtime in microseconds. The first call sets (initializes) the field f to zero. For each subsequent call, f contains the runtime in microseconds since the first call. The field F should be of type I .

Note

If the applications server is a multiple processor, switching the CPU to another processor may lead to fluctuations in the returned runtime. When measuring the runtime of smaller program components, you can achieve the correct result by taking several small measurements.

Example

DATA: T1 TYPE I, T2 TYPE I, TMIN TYPE I. DATA: F1(4000), F2 LIKE F1. TMIN = 1000000. DO 10 TIMES. GET RUN TIME FIELD T1. MOVE F1 TO F2. "Time measurement of the MOVE statement GET RUN TIME FIELD T2. T2 = T2 - T1. IF T2 < TMIN. TMIN = T2. ENDIF. ENDDO. WRITE: 'MOVE 4000 bytes takes', TMIN, 'microseconds'.

Related To perform runtime measurements of complex processes use the runtime analysis transaction (SE30) .

Index
© SAP AG 1996