# normal-timer

> Normalized timer

Latest version **2.0.0** (published 2021-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install normal-timer
pnpm add normal-timer
yarn add normal-timer
bun add normal-timer
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-05-11 |
| First published | 2021-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AJ Savino |
| Maintainers | koga73 |
| Keywords | normal, timer, delta, elapsed, tick |

## Links

- npm: https://www.npmjs.com/package/normal-timer
- Repository: https://github.com/koga73/NormalTimer
- Homepage: https://github.com/koga73/NormalTimer#readme
- Issues: https://github.com/koga73/NormalTimer/issues
- npm.io page: https://npm.io/package/normal-timer

## Recent versions

- 2.0.0 (latest) — 2021-05-11

## README

# NormalTimer

Provides a Normalized Timer

## EcmaScript Module Usage

```js
import NormalTimer from "normal-timer";

const normalTimer = new NormalTimer();

//Ex. Main render loop
function render() {
	const delta = normalTimer.tick();

	ball.x += ball.speed * delta; //Ex. Usage of delta
}
```

## CommonJS Usage

```js
var normalTimer = new NormalTimer();

//Ex. Main render loop
function render() {
	var delta = normalTimer.tick();

	ball.x += ball.speed * delta; //Ex. Usage of delta
}
```

## API

-   tick | Ticks the counter and returns the delta time in milliseconds since the last tick
-   delta | Returns the last calculated delta time in milliseconds
-   elapsed | Returns the time elapsed in milliseconds since creation of the normal timer

---
_Source: https://npm.io/package/normal-timer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
