Home Notices Documents Classes Download Others Rice
Classes  >  timer  >  Interval(int)
timer class : Interval(int) setter

Description

Sets a value that indicates an interval of timer run.

Syntax

timerInstance.Interval = timeSpan

Arguments

ClassNameDescription
inttimeSpanA Value that indicates an interval of timer run.

Return value

None.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

...

3:

open fitter handle()

4:

// any initialization code...

5:

endfitter

6:

...

7:

open method void timerHandler(timer t)

8:

// any handling code....

9:

endmethod

10:

...

11:

endclass

Usage of the Interval setter is as follows.

1:

handle h = new handle();

2:

timer t = new timer(h,"timerHandler(timer)", 1000);

3:

t.Interval = 500; // It changes the interval from 1000 to 500.

Notes

It's a wrapper of the System.Windows.Threading.DispatcherTimer.Interval property.

Unit is in milliseconds.

Zero or less cannot be specified.

Links for reference

Copyright © Rice All rights reserved.