use Math.floor not parseInt
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
74 | this.responseTime = new Date().getTime(); | 74 | this.responseTime = new Date().getTime(); |
75 | this.roundTripTime = this.responseTime - this.requestTime; | 75 | this.roundTripTime = this.responseTime - this.requestTime; |
76 | this.bytesReceived = this.response.byteLength || this.response.length; | 76 | this.bytesReceived = this.response.byteLength || this.response.length; |
77 | this.bandwidth = parseInt((this.bytesReceived / this.roundTripTime) * 8 * 1000,10); | 77 | this.bandwidth = Math.floor((this.bytesReceived / this.roundTripTime) * 8 * 1000); |
78 | } | 78 | } |
79 | 79 | ||
80 | return callback.call(this, false, url); | 80 | return callback.call(this, false, url); | ... | ... |
-
Please register or sign in to post a comment