time-per
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i time-per

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.62 kB

Total Files

6

Last publish

Collaborators

  • richienb