mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
use Date.now() instead of new Date().getTime()
This is documented to be more performant. The substitution was made on frontend code, too (i.e., the one in /static), because Date.now() is supported since IE 9, and we are life supporting only IE 11. Commands: find . -name *.js | xargs sed --in-place "s/new Date().getTime()/Date.now()/g" find . -name *.js | xargs sed --in-place "s/(new Date()).getTime()/Date.now()/g" Not done on jQuery.
This commit is contained in:
parent
90bfbeb38d
commit
b34fc2de2b
13 changed files with 23 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
var startTime = new Date().getTime();
|
||||
var startTime = Date.now();
|
||||
|
||||
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
|
||||
|
||||
|
@ -73,7 +73,7 @@ require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
|
|||
|
||||
function log(str)
|
||||
{
|
||||
console.log((new Date().getTime() - startTime)/1000 + "\t" + str);
|
||||
console.log((Date.now() - startTime)/1000 + "\t" + str);
|
||||
}
|
||||
|
||||
unescape = function(val) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue