[**SixL client API**](../../../README.md)

***

[SixL client API](../../../README.md) / [game/clock](../README.md) / GameClockMp

# Interface: GameClockMp

The game's clock and calendar. The game's own time runs on its own, and a script may set or advance it.

## Remarks

Every getter returns a Promise. Hours are 0..23, minutes and seconds 0..59.

## Methods

### addToClockTime()

> **addToClockTime**(`hours`, `minutes`, `seconds`): `void`

Adds a span of time to the game clock.

#### Parameters

##### hours

`number`

Hours to add.

##### minutes

`number`

Minutes to add.

##### seconds

`number`

Seconds to add.

#### Returns

`void`

#### Example

```ts
mp.game.clock.addToClockTime(0, 30, 0);
```

***

### addToTime()

> **addToTime**(`hours`, `minutes`, `seconds`): `void`

The same as [GameClockMp.addToClockTime](#addtoclocktime).

#### Parameters

##### hours

`number`

Hours to add.

##### minutes

`number`

Minutes to add.

##### seconds

`number`

Seconds to add.

#### Returns

`void`

#### Example

```ts
mp.game.clock.addToTime(0, 30, 0);
```

***

### advanceClockTimeTo()

> **advanceClockTimeTo**(`hour`, `minute`, `second`): `void`

Moves the game time forward to a given time of the day. It does not go back.

#### Parameters

##### hour

`number`

Hour, 0..23.

##### minute

`number`

Minute, 0..59.

##### second

`number`

Second, 0..59.

#### Returns

`void`

#### Example

```ts
mp.game.clock.advanceClockTimeTo(18, 30, 0);
```

***

### advanceTimeTo()

> **advanceTimeTo**(`hour`, `minute`, `second`): `void`

The same as [GameClockMp.advanceClockTimeTo](#advanceclocktimeto).

#### Parameters

##### hour

`number`

Hour, 0..23.

##### minute

`number`

Minute, 0..59.

##### second

`number`

Second, 0..59.

#### Returns

`void`

#### Example

```ts
mp.game.clock.advanceTimeTo(18, 30, 0);
```

***

### getDayOfMonth()

> **getDayOfMonth**(): `Promise`\<`number`\>

The current game day of the month.

#### Returns

`Promise`\<`number`\>

A Promise of the day of the month, 1..31.

#### Example

```ts
const day = await mp.game.clock.getDayOfMonth();
```

***

### getDayOfWeek()

> **getDayOfWeek**(): `Promise`\<`number`\>

The current game day of the week.

#### Returns

`Promise`\<`number`\>

A Promise of the day, an integer in the game's own numbering.

#### Example

```ts
const weekday = await mp.game.clock.getDayOfWeek();
```

***

### getHours()

> **getHours**(): `Promise`\<`number`\>

The current game hour.

#### Returns

`Promise`\<`number`\>

A Promise of the hour, 0..23.

#### Example

```ts
const hour = await mp.game.clock.getHours();
```

***

### getMillisecondsPerGameMinute()

> **getMillisecondsPerGameMinute**(): `Promise`\<`number`\>

How many real milliseconds one game minute lasts.

#### Returns

`Promise`\<`number`\>

A Promise of the duration of a game minute, in milliseconds.

#### Example

```ts
const ms = await mp.game.clock.getMillisecondsPerGameMinute();
```

***

### getMinutes()

> **getMinutes**(): `Promise`\<`number`\>

The current game minute.

#### Returns

`Promise`\<`number`\>

A Promise of the minute, 0..59.

#### Example

```ts
const minute = await mp.game.clock.getMinutes();
```

***

### getMonth()

> **getMonth**(): `Promise`\<`number`\>

The current game month.

#### Returns

`Promise`\<`number`\>

A Promise of the month, 1..12.

#### Example

```ts
const month = await mp.game.clock.getMonth();
```

***

### getSeconds()

> **getSeconds**(): `Promise`\<`number`\>

The current game second.

#### Returns

`Promise`\<`number`\>

A Promise of the second, 0..59.

#### Example

```ts
const second = await mp.game.clock.getSeconds();
```

***

### getYear()

> **getYear**(): `Promise`\<`number`\>

The current game year.

#### Returns

`Promise`\<`number`\>

A Promise of the full year, for example 2026.

#### Example

```ts
const year = await mp.game.clock.getYear();
```

***

### pause()

> **pause**(`toggle`): `void`

The same as [GameClockMp.pauseClock](#pauseclock).

#### Parameters

##### toggle

`boolean`

`true` to pause the clock, `false` to let it run.

#### Returns

`void`

#### Example

```ts
mp.game.clock.pause(false);
```

***

### pauseClock()

> **pauseClock**(`toggle`): `void`

Stops or starts the game clock.

#### Parameters

##### toggle

`boolean`

`true` to pause the clock, `false` to let it run.

#### Returns

`void`

#### Example

```ts
mp.game.clock.pauseClock(true);
```

***

### setClockDate()

> **setClockDate**(`day`, `month`, `year`): `void`

Sets the game date.

#### Parameters

##### day

`number`

Day of the month, 1..31.

##### month

`number`

Month, 1..12.

##### year

`number`

Full year, for example 2026.

#### Returns

`void`

#### Example

```ts
mp.game.clock.setClockDate(1, 7, 2026);
```

***

### setClockTime()

> **setClockTime**(`hour`, `minute`, `second`): `void`

Sets the game time to a given hour, minute and second.

#### Parameters

##### hour

`number`

Hour, 0..23.

##### minute

`number`

Minute, 0..59.

##### second

`number`

Second, 0..59.

#### Returns

`void`

#### Example

```ts
mp.game.clock.setClockTime(12, 0, 0);
```

***

### setDate()

> **setDate**(`day`, `month`, `year`): `void`

The same as [GameClockMp.setClockDate](#setclockdate).

#### Parameters

##### day

`number`

Day of the month, 1..31.

##### month

`number`

Month, 1..12.

##### year

`number`

Full year, for example 2026.

#### Returns

`void`

#### Example

```ts
mp.game.clock.setDate(1, 7, 2026);
```

***

### setTime()

> **setTime**(`hour`, `minute`, `second`): `void`

The same as [GameClockMp.setClockTime](#setclocktime).

#### Parameters

##### hour

`number`

Hour, 0..23.

##### minute

`number`

Minute, 0..59.

##### second

`number`

Second, 0..59.

#### Returns

`void`

#### Example

```ts
mp.game.clock.setTime(12, 0, 0);
```
