# [name]

Object for keeping track of time. This uses [link:https://developer.mozilla.org/en-US/docs/Web/API/Performance/now performance.now] if it is available, otherwise it reverts to the less accurate [link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now Date.now].

## Constructor

### [name]( [param:Boolean autoStart] )

autoStart — (optional) whether to automatically start the clock. Default is true.

## Properties

### [property:Boolean autoStart]

If set, starts the clock automatically when the first update is called. Default is true.

### [property:Float startTime]

Holds the time at which the clock's [page:Clock.start start] method was last called.

### [property:Float oldTime]

Holds the time at which the clock's [page:Clock.start start], [page:Clock.getElapsedTime getElapsedTime] or [page:Clock.getDelta getDelta] methods were last called.

### [property:Float elapsedTime]

Keeps track of the total time that the clock has been running.

### [property:Boolean running]

Whether the clock is running or not.

## Methods

### [method:null start]()

Starts clock. Also sets the [page:Clock.startTime startTime] and [page:Clock.oldTime oldTime] to the current time, sets [page:Clock.elapsedTime elapsedTime] to *0* and [page:Clock.running running] to *true*.

### [method:null stop]()

Stops clock and sets [page:Clock.oldTime oldTime] to the current time.

### [method:Float getElapsedTime]()

Get the seconds passed since the clock started and sets [page:Clock.oldTime oldTime] to the current time.
If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock.

### [method:Float getDelta]()

Get the seconds passed since the time [page:Clock.oldTime oldTime] was set and sets [page:Clock.oldTime oldTime] to the current time.
If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]