TemporalCounter¶
Overview¶
Used by EngagementMetrics to keep track of the seconds in which activity occurs. For example, with a binSize of 1000, calling onEvent with three values within the range of 1000 will result in a single "count" because they were all in a bin. See unit tests for more examples.
@author Michael Kauzmann (PhET Interactive Simulations) @author Chris Klusendorf (PhET Interactive Simulations) @author Sam Reid (PhET Interactive Simulations)
Class TemporalCounter¶
Constructor¶
new TemporalCounter( binSize : number )¶
Instance Methods¶
onEvent( time : number )¶
Instance Properties¶
counts : number¶
Source Code¶
See the source for TemporalCounter.ts in the joist repository.