Skip to content

Commit

Permalink
set runTime before the first interval
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktaubeneck committed Jul 19, 2024
1 parent b0d667b commit ac6223b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/app/query/view/[id]/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function RunTimePill({ statusEvent }: { statusEvent: StatusEvent }) {
if (statusEvent?.endTime !== null) {
setRunTime(statusEvent.endTime - statusEvent.startTime);
} else {
setRunTime(Date.now() / 1000 - statusEvent.startTime);
let newIntervalId = setInterval(() => {
setRunTime(Date.now() / 1000 - statusEvent.startTime);
}, 1000);
Expand Down

0 comments on commit ac6223b

Please sign in to comment.