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.

TimeToLive property

Project: Console Application Runner Classes

Unit: PJConsoleApp

Classes: TPJCustomConsoleApp, TPJConsoleApp

Applies to: ~>3.0

property TimeToLive: LongWord;

Description

This read only property indicates the amount of time, in milliseconds, a console application has left to run before it times out.

The property is initialised to the value of the MaxExecTime property when the application starts and is decremented at the end of each time slice. When the application has completed the value is set to 0.

Remarks

It is only meaningful to examine the value of TimeToLive in the OnStart, OnWork and OnComplete event handlers.

If MaxExecTime is INFINITE then TimeToLive will always be INFINITE while the application is executing.

If TimeSlice is INFINITE then TimeToLive will always have the same value as MaxExecTime until the application completes.

The property is public in TPJConsoleApp and protected in TPJCustomConsoleApp.