⚡ Better elapsed request time calculation
This commit is contained in:
@@ -767,7 +767,7 @@
|
|||||||
headers = headersObject;
|
headers = headersObject;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const startTime = new Date().getTime();
|
const startTime = Date.now();
|
||||||
const payload = await this.$axios({
|
const payload = await this.$axios({
|
||||||
method: this.method,
|
method: this.method,
|
||||||
url: this.url + this.pathName + this.queryString,
|
url: this.url + this.pathName + this.queryString,
|
||||||
@@ -776,8 +776,7 @@
|
|||||||
data: requestBody ? requestBody.toString() : null
|
data: requestBody ? requestBody.toString() : null
|
||||||
});
|
});
|
||||||
|
|
||||||
const endTime = new Date().getTime();
|
const duration = Date.now() - startTime;
|
||||||
const duration = endTime - startTime;
|
|
||||||
this.$toast.info(`Finished in ${duration}ms`, {
|
this.$toast.info(`Finished in ${duration}ms`, {
|
||||||
icon: 'done'
|
icon: 'done'
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user