0.0.1 • Published 1 year ago

downloading-time v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Downloading Time

This module calculate the time of downloading files

Installation via npm

npm install downloading-time

Installation via git

git clone https://github.com/byteow/downloading-time.git

npm i

All ready !

Code examples

import { downloadingTime } from 'downloading-time';

const totalBytes = 200000000; // 200 MB
const bytesPeerSecond = 1600000; // 16 MB peer sec

const time = downloadingTime(totalBytes, bytesPeerSecond);

console.log(time);

	/*
		{
			hours: 0,
			minutes: 2,
			seconds: 48,
			totalBytes: 200000000,
			bytesPeerSecond: 1600000
		}
	*/
0.0.1

1 year ago