Skip to content

Latest commit

 

History

History
81 lines (51 loc) · 2.35 KB

Constants.md

File metadata and controls

81 lines (51 loc) · 2.35 KB

Constants

Project: Console Application Runner Classes

Unit: PJConsoleApp

Applies to: ~>3.0

The following constants are declared in the library.

cOneSecInMS

const cOneSecInMS = 1000;

Number of milliseconds in a second. This can be a useful value when setting properties such as TPJCustomConsoleApp.MaxExecTime and TPJCustomConsoleApp.TimeSlice.

cOneMinInMS

const cOneMinInMS = 60 * cOneSecInMS;

Number of milliseconds in a minute. This can be useful when setting the TPJCustomConsoleApp.MaxExecTime property.

cDefTimeSlice

Introduced: v1.0

cDefTimeSlice = 50;

Default value of the TPJCustomConsoleApp.TimeSlice property.

There should rarely be a need to use this value directly.

cDefMaxExecTime

const cDefMaxExecTime = cOneMinInMS;

Default value of the TPJCustomConsoleApp.MaxExecTime property.

There should rarely be a need to use this value directly.

cAppErrorMask

const cAppErrorMask = 1 shl 29;

Mask that is ORd with application error codes. This sets bit 29 in accordance with Windows requirements. Application error codes are tested for by ANDing them with this constant.

The IsApplicationError routine is provided to perform this test so there should be no need to use cAppErrorMask directly.

cAppErrorTimeOut

const cAppErrorTimeOut = 1 or cAppErrorMask;

Error code used to report that an application has timed out. c.f. the TPJCustomConsoleApp.ErrorCode property.

cAppErrorTerminated

const cAppErrorTerminated = 2 or cAppErrorMask;

Error code used to report that an application has been terminated. c.f. the TPJCustomConsoleApp.ErrorCode property and TPJCustomConsoleApp.Terminate method.