mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
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
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue