Show / Hide Table of Contents

Method timer.Every


Overload

Starts periodic timer. If already started, resets and changes its period.

public void Every(int milliseconds)
Parameters
milliseconds  (int)

Time interval (period) of calling the callback function. The actual minimal period is 10-20 ms.

Exceptions
ArgumentOutOfRangeException

Negative.

InvalidOperationException

Called not in the same thread as previous Start.

Win32Exception

API SetTimer returned 0. Unlikely.

Remarks

The callback function can stop the timer or restart with different period. If already started, this function must be called in the same thread as when started.