JSPM

cronometerjs

1.1.5
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q34156F
    • License ISC

    Timer and StopWatch

    Package Exports

    • cronometerjs
    • cronometerjs/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cronometerjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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
            }
        }
    }