UNPKG

@badeball/cypress-cucumber-preprocessor

Version:

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

21 lines (20 loc) 559 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.duration = exports.createTimestamp = void 0; function createTimestamp() { const now = new Date().getTime(); const seconds = Math.floor(now / 1000); const nanos = (now - seconds * 1000) * 1000000; return { seconds, nanos, }; } exports.createTimestamp = createTimestamp; function duration(start, end) { return { seconds: end.seconds - start.seconds, nanos: end.nanos - start.nanos, }; } exports.duration = duration;