Skip to content

Commit 57d2292

Browse files
committed
Use the faster (new Date()).getTime().
See http://jsperf.com/date-now-vs-new-date-gettime/4
1 parent d4f3b5b commit 57d2292

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/jquery.fileupload.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 5.28.3
2+
* jQuery File Upload Plugin 5.28.4
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -215,7 +215,7 @@
215215
],
216216

217217
_BitrateTimer: function () {
218-
this.timestamp = +(new Date());
218+
this.timestamp = (new Date()).getTime();
219219
this.loaded = 0;
220220
this.bitrate = 0;
221221
this.getBitrate = function (now, loaded, interval) {
@@ -289,7 +289,7 @@
289289

290290
_onProgress: function (e, data) {
291291
if (e.lengthComputable) {
292-
var now = +(new Date()),
292+
var now = (new Date()).getTime(),
293293
loaded;
294294
if (data._time && data.progressInterval &&
295295
(now - data._time < data.progressInterval) &&

0 commit comments

Comments
 (0)