TemporalCounter¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/joist/blob/main/js/TemporalCounter.ts for the most up-to-date information.
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.