Replace a few new Date().getTime()
instances with Date.now()
The former format is not only more verbose, but it's also *slightly* less efficient since it creates a new `Date` object.
This commit is contained in:
parent
0479deef4e
commit
4733f163e8
@ -40,7 +40,7 @@ const TestReporter = function (browser) {
|
||||
}
|
||||
|
||||
this.now = function () {
|
||||
return new Date().getTime();
|
||||
return Date.now();
|
||||
};
|
||||
|
||||
this.jasmineStarted = function (suiteInfo) {
|
||||
|
@ -102,7 +102,7 @@ class PDFPresentationMode {
|
||||
evt.preventDefault();
|
||||
|
||||
const delta = normalizeWheelEventDelta(evt);
|
||||
const currentTime = new Date().getTime();
|
||||
const currentTime = Date.now();
|
||||
const storedTime = this.mouseScrollTimeStamp;
|
||||
|
||||
// If we've already switched page, avoid accidentally switching again.
|
||||
|
Loading…
x
Reference in New Issue
Block a user