now

Time in seconds since the epoch.

Usage

var now = require( '@stdlib/time/now' );

now()

Returns the time in seconds since the epoch.

var ts = now();
// returns <number>

Notes

Examples

var now = require( '@stdlib/time/now' );

var t0 = now();

setTimeout( onTimeout, 2000 );

function onTimeout() {
    var t1 = now();
    console.log( 'Seconds elapsed: %d', t1-t0 );
}

CLI

Usage

Usage: now [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ now
<number>
Did you find this page helpful?