Better elapsed request time calculation

This commit is contained in:
liyasthomas
2019-10-12 23:13:37 +05:30
parent 39cbe8a858
commit 0fdb4197a1

View File

@@ -767,7 +767,7 @@
headers = headersObject;
try {
const startTime = new Date().getTime();
const startTime = Date.now();
const payload = await this.$axios({
method: this.method,
url: this.url + this.pathName + this.queryString,
@@ -776,8 +776,7 @@
data: requestBody ? requestBody.toString() : null
});
const endTime = new Date().getTime();
const duration = endTime - startTime;
const duration = Date.now() - startTime;
this.$toast.info(`Finished in ${duration}ms`, {
icon: 'done'
});