clock

clock(): Integer;

The clock method of the Application class returns the relative time in milliseconds since the operating system was started on the workstation that is executing the method.

As the return value is limited by the size of an integer, the value returns to zero (0) after approximately 24 days.

This method provides a mechanism to obtain deltas (or differences) in time, taken at different points of execution; for example, as a means of timing the execution of a logic sequence.

The following example shows the use of the clock method.

bttnClientExec_click(btn: Button input) updating;
begin
    // Invokes a method that updates 5000 entries in a collection
    // and executes on the client node.  The time taken by the method
    // is recorded using the app.clock method.
    startTime := app.clock;
    self.executeOnClient;
    textBoxDuration.text := ((app.clock - startTime)/1000).String &
                             "seconds";
end;