SystemTimeInterruptMonitor

SystemTimeInterruptMonitor class

Simple implementation of AbstractInterruptMonitor by checking and comparing current system time with user specified limit.

Constructors

NameDescription
SystemTimeInterruptMonitorConstructs one interruption monitor.

Properties

NameTypeDescription
IsInterruptionRequestedbooleanThis implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than u
TerminateWithoutExceptionbooleanSee TerminateWithoutException . This property is specified by user when constructing this monitor instance.

Methods

NameDescription
startMonitorStarts the monitor with the specified time limit. The start time to calculate time cost is just when this method is call

SystemTimeInterruptMonitor(terminateWithoutException)

Constructs one interruption monitor.

ParameterTypeDescription
terminateWithoutExceptionbooleanTerminateWithoutException

SystemTimeInterruptMonitor.IsInterruptionRequested property

This implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than user specified limit.

Type: boolean

SystemTimeInterruptMonitor.TerminateWithoutException property

See TerminateWithoutException . This property is specified by user when constructing this monitor instance.

Type: boolean

startMonitor(msLimit)

Starts the monitor with the specified time limit. The start time to calculate time cost is just when this method is called, so the procedure which needs to be monitored should be started just after this call.

ParameterTypeDescription
msLimitinttime limit(ms) to require the interruption.