Files
diviocityandAlexander Medvednikov 89371e2b13 new module: x.progress (#29759)
* x3

* switched to term.printable_len(text)

---------

Co-authored-by: Alexander Medvednikov <alexander@medvednikov.com>
2026-10-08 02:55:50 +03:00

22 lines
392 B
V

module main
import x.progress
import time
fn main() {
total := 200
mut bar := progress.Bar.new(total,
text: 'copying '
style: progress.BlockStyle{}
show_rate: true
show_elapsed: true
leave: true // keep the finished bar on screen
)
bar.start()
for _ in 0 .. total {
time.sleep(10 * time.millisecond) // pretend to work
bar.inc()
}
bar.wait()
}