# RoomClient: tickRate property

> The tickRate read-only property of the RoomClient interface is the room's ticks per second, or 0 in a room without ticks.

The **`tickRate`** read-only property of the [`RoomClient`](/docs/client/room-client) interface is how many ticks the room runs per second.

## Value

A number: the room's tick rate, or `0` in a room without ticks. It's also `0` until the router accepts the first connection.

## Description

The client counts time in the room's ticks: [`serverTick()`](/docs/client/room-client/servertick), [`predict()`](/docs/client/room-client/predict) and [`interpolate()`](/docs/client/room-client/interpolate) all do. In a room without ticks they throw an [`IrtError`](/docs/client/irt-error) named `InvalidStateError`, and [`serverTime()`](/docs/client/room-client/servertime) is the room's clock instead. Before the first connection is accepted, the client can't tell, so they don't throw.

Owner writes go to the room at most once per tick in a room with ticks. In a room without ticks they go at the end of the task that made them, and a burst of them at most once every 16 ms.

## Examples

### Converting ticks to seconds

The room keeps the tick its round ends at, and the client shows the seconds left from the room's estimated tick.

```ts
// time-left.ts
import { connect, defineSchema, entity } from "@irtio/client";

const Round = entity("round", { endsAt: "u32" });
const room = await connect("main", { schema: defineSchema({ state: Round }) });

export function secondsLeft(): number {
  if (room.tickRate === 0) return 0;
  return Math.max(0, (room.state.endsAt - room.serverTick()) / room.tickRate);
}
```

## See also

- [`RoomClient.serverTick()`](/docs/client/room-client/servertick)
- [`RoomClient.tick`](/docs/client/room-client/tick)
- [Ticks](/docs/room/one-page#ticks)
