Neocon Propaganda Machine

    @ircam/blocked

    1.1.2 • Public • Published

    Blocked

    Periodic test for event loop, in the browser or in node. Callback to report each time it was blocked.

    Install

    npm install [--save] @ircam/blocked

    Example

    It is the same usage within node or a web browser.

    import Blocked from '@ircam/blocked';
    
    const threshold = 100; // report blockage of more than 100 ms
    
    const blocked = new Blocked( (duration) => {
        console.log(`Blocked for ${duration} ms`);
        }, threshold);
    
    // that's it is runs in the background
    // in case you want to stop it:
    blocked.stop();

    Keywords

    none

    Install

    npm i @ircam/blocked

    DownloadsWeekly Downloads

    1

    Version

    1.1.2

    License

    BSD-3-Clause

    Unpacked Size

    119 kB

    Total Files

    8

    Last publish

    Collaborators

    • jipodine
    • norbert.schnell
    • b-ma