Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

ElapsedTime property

Project: Console Application Runner Classes

Unit: PJConsoleApp

Classes: TPJCustomConsoleApp, TPJConsoleApp

Applies to: ~>3.0

property ElapsedTime: LongWord;

Description

This read only property gives the approximate time in milliseconds since the console application began executing. The clock stops when the application completes or times out.

This property is updated only when the application yields control to this class. The frequency with which this happens depends on the TimeSlice property. If TimeSlice is INFINITE then ElapsedTime is only updated once the application terminates.

Examine ElapsedTime in an OnWork event handler to get the updated execution time while a process is executing. Examine the property after a process has completed to get the total execution time.

Times are approximate.

Remarks

The property is public in TPJConsoleApp and protected in TPJCustomConsoleApp.