Skip to content

feat: show time left, elapsed and estimated finish in status - #1

Merged
trevin-lee merged 1 commit into
trevin-lee:mainfrom
ynezz:pr/status-timing
Oct 10, 2026
Merged

trevin-lee merged 1 commit into
trevin-lee:mainfrom
ynezz:pr/status-timing

Conversation

@ynezz

@ynezz ynezz commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

hi, my clankers found this nice project during research, I liked it so decided to make you aware about the changes I've made for my use cases, so everyone can profit from that, but feel free to close it or implement it differently, happy to help with testing, cheers, Petr


prusactl status showed the progress of a running print, but not when the print ends. PrusaLink and Prusa Connect both report time_remaining and time_printing in seconds. The status line now adds the time left, the finish time on the local clock, and the time elapsed:

PRINTING 42%, 1h53m left (ends ~09:12), 1h30m elapsed, nozzle 255.1/255°C, bed 85/85°C

get_printer and list_printers gain time_elapsed and ends_at (RFC 3339) next to time_remaining. The new internal/jobtime package reads the fields once, for the CLI and for the MCP summary. Both leave out the same bad values: a value that is missing, negative or not a number.

Compatibility: time_remaining and time_elapsed are whole seconds.

Testing

  • go test ./..., go vet, gofmt.
  • Live on a CORE One L (firmware 6.8.1), on the Connect route and on the direct PrusaLink route, during real prints.

@trevin-lee

Copy link
Copy Markdown
Owner

Hi Petr, thanks for these. I'd tabled prusactl as bug-fixes-only, but with someone interested in it I'm reopening it for features.

I reviewed all five. This one is clean and I'm merging it. The only change is a rebase: CHANGELOG.md conflicts with the Unreleased section on main. I'll push that.

Your branches have maintainer edits on, so for the others I'll push the small fixes onto each branch and note what I changed in the PR. If you'd rather do them yourself, say so and I'll post the list instead.

The status line for a running print showed only the progress. To learn
when the print ends, you had to read the printer screen or calculate
from the percentage.

Both routes already report `time_remaining` and `time_printing` in
seconds. The status line now adds the time left, the finish time on the
local clock, and the time elapsed:

  PRINTING 89%, 23m left (ends ~12:41), 2h10m elapsed, nozzle 250/250°C

`get_printer` and `list_printers` gain `time_elapsed` and `ends_at` next
to `time_remaining`. The `internal/jobtime` package reads the fields, so
the CLI line and the MCP summary leave out the same values: a value that
is missing, negative or not a number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@trevin-lee
trevin-lee merged commit 8c19ffc into trevin-lee:main Oct 10, 2026
4 checks passed
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