search

Class myphysicslab.lab.view.DisplayClock

Provided By
All Implemented Interfaces

Draws a clock with two 'second hands': one tracks the simulation time, the other tracks real time. This makes it easy to see whether the simulation time is keeping up with real time.

new DisplayClock( simTimeFn, realTimeFn, period, radius, location )

Parameters
simTimeFnfunction(): number

function that returns current simulation time

realTimeFnfunction(): number

function that returns current real time

period(number|undefined)

Period of clock in seconds, the time it takes for the seconds hand to wrap around; default is 2 seconds.

radius(number|undefined)

Radius of clock in simulation coords, default is 1.0.

location(myphysicslab.lab.util.Vector|undefined)

Location of center of clock, in simulation coords.

Instance Methods

Instance Properties

Static Properties

Type Definitions