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.

TimeSlice property

Project: Console Application Runner Classes

Unit: PJConsoleApp

Classes: TPJCustomConsoleApp, TPJConsoleApp

Applies to: ~>3.0

property TimeSlice: LongWord;

Description

Execution of a console application is normally time-sliced. This property determines the length of each time slice, in milliseconds. At the end of each time slice execution of the console application is paused, the length of time left to run is recalculated and the OnWork event is triggered.

TimeSlice may be set to INFINITE, in which case the console application is left to run until completion without interruption. In this case the OnWork event will never be triggered and the application will never time out. Furthermore, it is not possible to force the application to terminate via the Terminate method. Setting TimeSlice to INFINITE is not recommended.

The default property value is the value of the cDefTimeSlice constant.

Remarks

The property is public in TPJConsoleApp and protected in TPJCustomConsoleApp.