time-to-botec/js/node_modules/@stdlib/time/now
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
bin feat: add the node modules 2022-12-03 12:44:49 +00:00
docs feat: add the node modules 2022-12-03 12:44:49 +00:00
etc feat: add the node modules 2022-12-03 12:44:49 +00:00
lib feat: add the node modules 2022-12-03 12:44:49 +00:00
package.json feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00

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

  • The Unix epoch is 00:00:00 UTC on 1 January 1970.

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>