Skip to content

Commit

Permalink
fix: time elapsed for current
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioislima committed Nov 7, 2024
1 parent cce33a5 commit 44932b7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const DownloadManagerItem = observer(({ element, current, state }: Props) => {
progress.totalSize || installInfo?.manifest.download_size || 0

// calculate download time
const downloadTime = endTime - startTime
const downloadTime = (current ? Date.now() : endTime) - startTime
const downloadTimeInMinutes = Math.floor(downloadTime / 60000)
const downloadTimeInSeconds = Math.floor((downloadTime % 60000) / 1000)
const downloadTimeFormatted = `${downloadTimeInMinutes}m ${downloadTimeInSeconds}s`
Expand Down

0 comments on commit 44932b7

Please sign in to comment.