cronometerjs
v1.1.5
Published
Timer and StopWatch
Downloads
12
Maintainers
Readme
cronometerjs
OBS: Angolano.
How to define:
const _clock = require('cronometerjs')
const clock = new _clock()
Functions:
clock.start();
// => 'NOW'
clock.addRound();
// => 'Add Round'
clock.addObject(object);
// => send OBJECT to determined ROUND or in the round that is.
clock.removeObject(round);
// => remove OBJECT from ROUND not delete the round.
clock.removeRound(round);
// => 'delete Round'
clock.stop();
// => 'END'
clock.read();
// => return Object: { ms: Number, round: Object}
New Functions;
await clock.wait(ms);
// => He make a cooldown in the source. (is a async function, if u don't use await is don't work)
clock.clear();
// => Clear all the results of time and..
Function AddObject:
let data = {
test:"folder"
}
let round = 2;
// How to call;
clock.addObject(object, round);
// OR
clock.addObject(object);
Rounds:
{
"ms": number,
"round": {
"1": {
"data":object,
"ms":number
},
"2": {
"data":object,
"ms":number
}
}
}