mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
always show timer with one decimal precision (#617)
This commit is contained in:
parent
f82b8f3c1c
commit
1173001e46
@ -21,7 +21,7 @@ class ResponseTimer extends PureComponent {
|
|||||||
_handleUpdateElapsedTime () {
|
_handleUpdateElapsedTime () {
|
||||||
const {loadStartTime} = this.props;
|
const {loadStartTime} = this.props;
|
||||||
const millis = Date.now() - loadStartTime - 200;
|
const millis = Date.now() - loadStartTime - 200;
|
||||||
const elapsedTime = Math.round(millis / 100) / 10;
|
const elapsedTime = millis / 1000;
|
||||||
this.setState({elapsedTime});
|
this.setState({elapsedTime});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ class ResponseTimer extends PureComponent {
|
|||||||
return (
|
return (
|
||||||
<div className={classnames('overlay theme--overlay', {'overlay--hidden': !show})}>
|
<div className={classnames('overlay theme--overlay', {'overlay--hidden': !show})}>
|
||||||
{elapsedTime >= REQUEST_TIME_TO_SHOW_COUNTER
|
{elapsedTime >= REQUEST_TIME_TO_SHOW_COUNTER
|
||||||
? <h2>{elapsedTime} seconds...</h2>
|
? <h2>{elapsedTime.toFixed(1)} seconds...</h2>
|
||||||
: <h2>Loading...</h2>
|
: <h2>Loading...</h2>
|
||||||
}
|
}
|
||||||
<div className="pad">
|
<div className="pad">
|
||||||
|
Loading…
Reference in New Issue
Block a user