<<<<<<< HEAD ======= DeltaTimeCalculator | SDF-2D - v0.7.6 >>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

A helper class for calculating the elapsed time between frames.

Handles the case, where the browser tab is not in focus and `requestAnimationFrame` does not get called for performance reasons. In this case, the return deltaTime won't be an unreasonably large value.

### Hierarchy

- DeltaTimeCalculator

## Index

### Constructors

- constructor

### Methods

- destroy
- getNextDeltaTime

## Constructors

### constructor

- new DeltaTimeCalculator(): DeltaTimeCalculator

- <<<<<<< HEAD
  - Defined in helper/delta-time-calculator.ts:10
  =======
  - Defined in helper/delta-time-calculator.ts:10
  >>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

  #### Returns DeltaTimeCalculator

## Methods

### destroy

- destroy(): void

- <<<<<<< HEAD
  - Defined in helper/delta-time-calculator.ts:35
  =======
  - Defined in helper/delta-time-calculator.ts:35
  >>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

  #### Returns void

### getNextDeltaTime

- getNextDeltaTime(currentTime: DOMHighResTimeStamp): DOMHighResTimeStamp

- <<<<<<< HEAD
  - Defined in helper/delta-time-calculator.ts:25
  =======
  - Defined in helper/delta-time-calculator.ts:25
  >>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

  Return the elapsed time in milliseconds since the previous call of this method by subtracting the previously given `currentTime` argument from the current `currentTime` argument.

  Takes visibilitychange events into account.

  #### Parameters

  - ##### currentTime: DOMHighResTimeStamp

    Current time acquired e.g. with `requestAnimationFrame`.

  #### Returns DOMHighResTimeStamp