timestamp

Returns the current TOD or sets the timestamp or returns the delta timestamp.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

numeric timestamp([option])
int                option

Description

Timestamp granularity is in microseconds. Option values are defined in trim.h: .
option function
timestamp_delta If the timestamp() call is not part of an expression, then it sets the current timestamp. Otherwise it returns the delta timestamp in seconds and sets a new one.
Calling with no parameter is the same as timestamp_delta
timestamp_tod Returns the current time of day.

Example

Displays the application run time for 10000 operations:
timestamp();
for (i=10000;i;i--) j = i * i * i * i;
printf("10000 operations took "^^timestamp()^^" seconds";