* Find the engaged time between the event and the time (exclusive of the time) * @param {ActivityEventDef} activityEvent * @param {number} time * @return {number} * @private
(activityEvent, time)
| 41 | * @private |
| 42 | */ |
| 43 | function findEngagedTimeBetween(activityEvent, time) { |
| 44 | let engagementBonus = 0; |
| 45 | |
| 46 | if (activityEvent.type === ActivityEventType.ACTIVE) { |
| 47 | engagementBonus = DEFAULT_ENGAGED_SECONDS; |
| 48 | } |
| 49 | |
| 50 | return Math.min(time - activityEvent.time, engagementBonus); |
| 51 | } |
| 52 | |
| 53 | class ActivityHistory { |
| 54 | /** |
no outgoing calls
no test coverage detected