"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Check if the time has lasted for a certain duration
*
* @param prev Previous ISOTimestamp time to compare
* @param duration The duration to compare
* @category dateTime
* @module hasLasted
*/
var hasLasted = function (prev, duration, dateNow) {
if (dateNow === void 0) { dateNow = new Date(); }
var timePrev = new Date(prev).getTime();
var timeNow = dateNow.getTime();
return timeNow - timePrev >= duration;
};
exports.default = hasLasted;
Source