Skip to content

Use start.elapsed() instead of last_tick.elapsed() in Timer#425

Open
MozirDmitriy wants to merge 1 commit intonexus-xyz:mainfrom
MozirDmitriy:fix/timer-use-start-elapsed
Open

Use start.elapsed() instead of last_tick.elapsed() in Timer#425
MozirDmitriy wants to merge 1 commit intonexus-xyz:mainfrom
MozirDmitriy:fix/timer-use-start-elapsed

Conversation

@MozirDmitriy
Copy link
Contributor

Replaced the use of last_tick.elapsed() with start.elapsed() in the Timer component's draw_unchecked method.

This change ensures that the timer always displays the total elapsed time since the timer started, which matches typical user expectations for progress indicators.

Previously, last_tick was not updated anywhere except during initialization and finalize, so its use could be misleading and did not provide any additional value.

Using start.elapsed() makes the code simpler, more transparent, and consistent with how elapsed time is calculated elsewhere in the codebase.

@github-actions
Copy link

github-actions bot commented Jul 10, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@MozirDmitriy
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@sjudson
Copy link
Contributor

sjudson commented Jul 10, 2025

Thanks for the PR! At the moment the cli crate is more of a temporary patch, as we plan in the long-term to incorporate direct zkVM usage with the more general https://github.com/nexus-xyz/nexus-cli project. I'm going to leave this PR open because we might at some point bring the progress-bar over into the project and this may be a useful reference, but for the time being I'm going to leave the crate frozen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants