Cpu

Description

Reports the amount of CPU time that has elapsed since the application started.

Syntax

Cpu ( )

Returns

Long. Returns the number of milliseconds of CPU time elapsed since the start of your PowerBuilder application.

Examples

Example 1

These statements determine the amount of CPU time that elapsed while a group of statements executed:

long ll_start, ll_used

// Set the start equal to the current CPU usage.

ll_start = Cpu()

... // Executable statements being timed


// Set ll_used to the number of CPU seconds

// that were used (current CPU time - start).

ll_used = Cpu() - ll_start