# ClockViewModel

#### new Cesium.ClockViewModel(clock)
Widgets/ClockViewModel.js 29

  A view model which exposes a `Clock` for user interfaces.

  Name | Type | Description
  --- | --- | ---
  `clock` | Clock | optional The clock object wrapped by this view model, if undefined a new instance will be created.

  ##### See:

  - Clock

### Members

#### canAnimate : Boolean
Widgets/ClockViewModel.js 167

  Gets or sets whether or not `Clock.tick` can advance time. This could be false if data is being buffered, for example. The clock will only tick when both `canAnimate` and `shouldAnimate` are true. This property is observable.
  Default Value: `undefined`

#### clock : Clock
Widgets/ClockViewModel.js 202

  Gets the underlying Clock.

#### clockRange : ClockRange
Widgets/ClockViewModel.js 148

  Gets or sets how tick should behave when `startTime` or `stopTime` is reached. This property is observable.
  Default Value: `undefined`

#### clockStep : ClockStep
Widgets/ClockViewModel.js 128

  Gets or sets whether calls to `Clock.tick` are frame dependent or system clock dependent. This property is observable.
  Default Value: `undefined`

#### currentTime : JulianDate
Widgets/ClockViewModel.js 90

  Gets or sets the current time. This property is observable.
  Default Value: `undefined`

#### multiplier : Number
Widgets/ClockViewModel.js 108

  Gets or sets how much time advances when tick is called, negative values allow for advancing backwards. If `clockStep` is set to ClockStep.TICK_DEPENDENT this is the number of seconds to advance. If `clockStep` is set to ClockStep.SYSTEM_CLOCK_MULTIPLIER this value is multiplied by the elapsed system time since the last call to tick. This property is observable.
  Default Value: `undefined`

#### shouldAnimate : Boolean
Widgets/ClockViewModel.js 185

  Gets or sets whether or not `Clock.tick` should attempt to advance time. The clock will only tick when both `canAnimate` and `shouldAnimate` are true. This property is observable.
  Default Value: `undefined`

#### startTime : JulianDate
Widgets/ClockViewModel.js 56

  Gets or sets the start time of the clock. This property is observable.
  Default Value: `undefined`

#### stopTime : JulianDate
Widgets/ClockViewModel.js 73

  Gets or sets the stop time of the clock. This property is observable.
  Default Value: `undefined`

#### systemTime : JulianDate
Widgets/ClockViewModel.js 46

  Gets the current system time. This property is observable.
  Default Value: `JulianDate()`

### Methods

#### destroy()
Widgets/ClockViewModel.js 248

  Destroys the view model. Should be called to properly clean up the view model when it is no longer needed.

#### isDestroyed() → Boolean
Widgets/ClockViewModel.js 240

  ##### Returns:

  true if the object has been destroyed, false otherwise.

#### synchronize()
Widgets/ClockViewModel.js 214

  Updates the view model with the contents of the underlying clock. Can be called to force an update of the viewModel if the underlying clock has changed and `Clock.tick` has not yet been called.