# tf_agents.utils.timer.Timer

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L25-L48) |

Context manager to time blocks of code.

    tf_agents.utils.timer.Timer()

## Methods

### `reset`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L47-L48)

    reset()

### `start`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L38-L39)

    start()

### `stop`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L41-L42)

    stop()

### `value`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L44-L45)

    value()

### `__enter__`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L32-L33)

    __enter__()

### `__exit__`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/timer.py#L35-L36)

    __exit__(
        *args
    )