Home Cooker Classes Others Rice CookerGX
Classes  >  timer  >  timer(class,string,long)
timer class : timer(class,string,long) fitter


Return an instance of the timer type that is initialized by the specified value.


new timer(anyUserDefinedClass handleInstance, string signature, int interval)


anyUserDefinedClasshandleInstanceAn instance of the user-defined class that has defined the handler method.
stringsignatureSignature of the handler method that is defined in the handleInstance.
intintervalTime span.

Return value

timerA timer type instance that is initialized.

Sample code

timer timerInstance = new timer(handleInstance, "timerHandler(timer)", 5000);


The first argument is an instance of any user defined type. It must have the method that you want to run in the timer.

The second argument is a string that indicates the signature of the members of the first argument.

The timer handler must be open method, and must have a single timer type argument .

The return value will accept any type. However, the return value is not used. Recommends that do not return a value.

In other words, the handler should be have the following format.

open method handlerName(timer agumentName)

//Please do here the necessary processing.


If you want to specify this method in the second argument. It will specify as "handlerName(timer)".

The third argument is the specified time interval.

This argument is int type. You should be specified in the millisecond unit.

Zero or less cannot be specified.

Links for reference

Copyright © Rice All rights reserved.