# UITimer class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[Handler(UITimer.IHandler)]
public class UITimer : Widget
```

Provides a timer that executes code at a specified interval on the UI thread

**Remarks:** This provides a way to execute UI code at a specified [UITimer.Interval](https://eto.picoe.ca/api/type/eto.forms.uitimer/interval.md). Note that this is not a high-resolution timer, and you should avoid setting a small interval otherwise the UI may become unresponsive depending on the logic in the executed code. This typically executes the code on the UI main loop, thus the accuracy of the timer is dependent on the other UI code executing.

## Constructors

- [UITimer](https://eto.picoe.ca/api/type/eto.forms.uitimer/ctor.md): (2 overloads) Initializes a new instance of the [UITimer](https://eto.picoe.ca/api/type/eto.forms.uitimer.md) class.

## Properties

- [Interval](https://eto.picoe.ca/api/type/eto.forms.uitimer/interval.md): Gets or sets the interval, in seconds
- [Started](https://eto.picoe.ca/api/type/eto.forms.uitimer/started.md): Gets a value indicating whether this [UITimer](https://eto.picoe.ca/api/type/eto.forms.uitimer.md) is started.

## Methods

- [GetCallback](https://eto.picoe.ca/api/type/eto.forms.uitimer/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [OnElapsed](https://eto.picoe.ca/api/type/eto.forms.uitimer/onelapsed.md): Raises the [UITimer.Elapsed](https://eto.picoe.ca/api/type/eto.forms.uitimer/elapsed.md) event.
- [Start](https://eto.picoe.ca/api/type/eto.forms.uitimer/start.md): Starts the timer
- [Stop](https://eto.picoe.ca/api/type/eto.forms.uitimer/stop.md): Stops a running timer

## Events

- [Elapsed](https://eto.picoe.ca/api/type/eto.forms.uitimer/elapsed.md): Occurs each time the [UITimer.Interval](https://eto.picoe.ca/api/type/eto.forms.uitimer/interval.md) has elapsed

## Inherited Members

- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
