---
id: "P:cAlgo.API.Internals.Algo.Timer"
kind: "property"
type: "T:cAlgo.API.Internals.Algo"
url: "https://help.ctrader.com/ctrader-algo/references/General/Algo/Timer/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Algo.Timer

Member of [Algo](https://help.ctrader.com/ctrader-algo/references/General/Algo/index.md).

## Timer

Access to the Timer object.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public Timer Timer {get;}
```

Python:

```python
api.Timer: Timer
```

### Returns

`Timer` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Timer.Start(1);//start timer with 1 second interval
}

protected override void OnTimer()
{
    Chart.DrawStaticText("time", Time.ToString("HH:mm:ss"), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red);
}
```

Python:

```python
def on_start(self):
    api.Timer.Start(1)

def on_timer(self):
    api.Chart.DrawStaticText("time", str(api.Time), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red)
```

