# JSDoc: Class: Clock

# Class: Clock

## util.Clock()

#### new Clock()

Clock is a MonotonicClock that also offers the possibility of being reset.

Source:
  - util/Clock.js, line 132

### Extends

- MonotonicClock

### Methods

#### add(deltaTimeopt)

Add more time to the clock's 'start' time (t0).

Note: by adding time to t0, the current time is pushed forward (it becomes smaller). As a consequence, getTime() may return a negative number.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`deltaTime` | number | <optional> | the time to be added to the clock's start time (t0)

Source:
  - util/Clock.js, line 160

#### reset(newTimeopt)

Reset the time on the clock.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`newTime` | number | <optional> | 0 | the new time on the clock.

Source:
  - util/Clock.js, line 146