timer class : IsEnabled getter

Description

Returns a value that indicates whether the timer handing is running.

Syntax

instance.IsEnabled

Arguments

None

Return value

ClassDescription
boolWhether the handling is running.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void THandler(dictionary dic)

3:

... // timer handler code.

4:

endmethod

5:

endclass

Usage of the IsEnabled getter is as follows.

1:

handle h = new handle();

2:

timer tim = new timer(h,"THandler(dictionary)", 1000);

3:

tim.Start();

4:

bool run = tim.IsEnabled; // "true"

Notes

Returns true if:

From the start() to the Stop().

From Start() until the timer handler method stops with an exception.

From OneShot() to call of the timer handler method.

Otherwise, returns false.

Links for reference

None.

Copyright © Cooker All rights reserved.