1.0.0 • Published 5 years ago

time-per v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Times per timeframe Travis CI Build Status

Assuming an operation was completed a specific amount of times in a timeframe, calculate the operations on average that were completed every specified unit of time.

NPM Badge

Install

npm install time-per

Usage

const timePer = require("time-per")

const timesPressed = 2
const secsPassed = 15

`User will press the button ${timePer(timesPressed, secsPassed, 60)} per minute`
//=> "User will press the button 8 times per minute"

API

timePer(num, time, est)

num

Type: number

The amount of times the operation was completed.

time

Type: number

The amount of time it took for all the operations to complete.

est

Type: number

The units of time to estimate the operation amount for.