# RoomClient: joinTime property

> The joinTime read-only property of the RoomClient interface is how long the client took to join the room, and whether the room started on the way.

The **`joinTime`** read-only property of the [`RoomClient`](/docs/client/room-client) interface is how long the client took to join the room, and whether the room had to start first.

## Value

An object with these properties, or `undefined` until [`ready`](/docs/client/room-client/ready) resolves:

`ms`
: A number: the milliseconds from constructing the client to applying the room's first full state update. After a reconnect, it's the milliseconds from the drop to the client holding the room's state again.

`started`
: A boolean: `true` if the router sent a [`waking` event](/docs/client/room-client/waking-event) on the way, which it does for a room that wakes from hibernation, a room the connection creates and a room that restarts after a crash.

## Description

`ms` leaves out any [`createRoom()`](/docs/client/createroom) or [`quickJoin()`](/docs/client/quickjoin) before the client was constructed. The UI kit's [join loader](/docs/client/ui-kit#irt-join-loader) shows it.

## Examples

### Recording join times

The game sends each join's time to its own analytics, split by whether the room had to start, since a wake takes longer.

```ts
// join-metrics.ts
import { connect } from "@irtio/client";

const room = await connect("main");
const { ms, started } = room.joinTime ?? { ms: 0, started: false };
console.log(`joined in ${Math.round(ms)} ms${started ? ", room started" : ""}`);
room.addEventListener("open", () => {
  if (room.joinTime) console.log(`back in ${Math.round(room.joinTime.ms)} ms`);
});
```

## See also

- [`waking` event](/docs/client/room-client/waking-event)
- [UI kit](/docs/client/ui-kit#irt-join-loader), whose join loader shows it
