> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/v3.0/wisej.web/other-components/wisej.web.timer.md).

# Timer

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.0.0.0)

* [Component](/api/v3.0/wisej.base/general/wisej.base.component.md)
  * [Component](/api/v3.0/wisej.web/general/wisej.web.component.md)
    * [Timer](/api/v3.0/wisej.web/other-components/wisej.web.timer.md)

Implements a timer that raises an event at user-defined intervals.

{% tabs %}
{% tab title="C#" %}

```csharp
public class Timer : Component
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class Timer
    Inherits Component
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/uCY6T77rh488FWHzpJ6P)Timer()

Initializes a new instance of the [Timer](/api/v3.0/wisej.web/other-components/wisej.web.timer.md) class.

### ![](/files/uCY6T77rh488FWHzpJ6P)Timer(container)

Initializes a new instance of the [Timer](/api/v3.0/wisej.web/other-components/wisej.web.timer.md) class together with the specified container.

| Name          | Type                                                                                       | Description                                                                                                                               |
| ------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **container** | [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) | A [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) that represents the container for the timer. |

## Properties

### ![](/files/uCY6T77rh488FWHzpJ6P)Enabled

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the timer is running.

### ![](/files/uCY6T77rh488FWHzpJ6P)Interval

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Returns or sets the time, in milliseconds, before the [Tick](#tick) event is raised relative to the last occurrence of the [Tick](#tick) event.

### ![](/files/uCY6T77rh488FWHzpJ6P)Tag

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object): Returns or sets an arbitrary string representing some type of user state.

## Methods

### ![](/files/uCY6T77rh488FWHzpJ6P)Restart()

Resets the timer.

### ![](/files/uCY6T77rh488FWHzpJ6P)Start()

Starts the timer.

### ![](/files/uCY6T77rh488FWHzpJ6P)Stop()

Stops the timer.

## Events

### ![](/files/uCY6T77rh488FWHzpJ6P)Tick

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the specified timer interval has elapsed and the timer is enabled.

## Implements

| Name                                                                                   | Description                                    |
| -------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface. |
| [IWisejSerializable](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.          |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/api/v3.0/wisej.web/other-components/wisej.web.timer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
