Java.Util.Timer Class
Timers schedule one-shot or recurring Java.Util.TimerTask for execution.

See Also: Timer Members

Syntax

[Android.Runtime.Register("java/util/Timer", DoNotGenerateAcw=true)]
public class Timer : Java.Lang.Object

Remarks

Timers schedule one-shot or recurring Java.Util.TimerTask for execution. Prefer Java.Util.Concurrent.ScheduledThreadPoolExecutor for new code.

Each timer has one thread on which tasks are executed sequentially. When this thread is busy running a task, runnable tasks may be subject to delays.

One-shot are scheduled to run at an absolute time or after a relative delay.

Recurring tasks are scheduled with either a fixed period or a fixed rate:

When a timer is no longer needed, users should call Timer.Cancel, which releases the timer's thread and other resources. Timers not explicitly cancelled may hold resources indefinitely.

This class does not offer guarantees about the real-time nature of task scheduling. Multiple threads can share a single timer without synchronization.

[Android Documentation]

Requirements

Namespace: Java.Util
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1