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

    5.0.0 • Public • Published

    time-span

    Simplified high resolution timing

    Install

    $ npm install time-span
    

    Usage

    import timeSpan from 'time-span';
    
    const end = timeSpan();
    
    timeConsumingFn();
    
    console.log(end());
    //=> 1745.3186
    
    console.log(end.rounded());
    //=> 1745
    
    console.log(end.seconds());
    //=> 1.7453186

    API

    const end = timeSpan()

    Returns a function, that when called, returns the time difference.

    end()

    Elapsed milliseconds.

    end.rounded()

    Elapsed milliseconds rounded.

    end.seconds()

    Elapsed seconds.

    end.nanoseconds()

    Elapsed nanoseconds.

    Install

    npm i time-span

    DownloadsWeekly Downloads

    8,265

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    3.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus