time-per
v1.0.0
Published
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.
Downloads
4
Readme
Times per timeframe
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.
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.