Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1.3 KB

TPJCustomConsoleApp-TimeSlice.md

File metadata and controls

25 lines (14 loc) · 1.3 KB

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.