summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/common.js b/js/common.js
index 59231010e..194fdcd9d 100755
--- a/js/common.js
+++ b/js/common.js
@@ -154,7 +154,10 @@ String.prototype.stripTags = function() {
/* exported xhr */
const xhr = {
+ _ts: 0,
post: function(url, params = {}, complete = undefined, failed = undefined) {
+ this._ts = new Date().getTime();
+
console.log('xhr.post', '>>>', params);
return new Promise((resolve, reject) => {
@@ -171,7 +174,7 @@ const xhr = {
reject(error);
},
load: function(data, ioargs) {
- console.log('xhr.post', '<<<', ioargs.xhr);
+ console.log('xhr.post', '<<<', ioargs.xhr, (new Date().getTime() - xhr._ts) + " ms");
if (complete != undefined)
complete(data, ioargs.xhr);
@@ -197,7 +200,7 @@ const xhr = {
reject(e);
}
- console.log('xhr.json', '<<<', obj);
+ console.log('xhr.json', '<<<', obj, (new Date().getTime() - xhr._ts) + " ms");
if (obj && typeof App != "undefined")
if (!App.handleRpcJson(obj)) {