timer class : Start() method

Description

Starts the timer handling.

Syntax

instance.Start()

Arguments

None

Return value

None

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 Start() method is as follows.

1:

handle h = new handle();

2:

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

3:

tim.Start(); // The handler method will be called every time the set time elapses.

Notes

The handler method is called each time after the set time has elapsed.

The method call continues until it is stopped explicitly or by an exception.

If this method is already called, re-call will be ignored.

Links for reference

None

Copyright © Cooker All rights reserved.