1
Fork 0
mirror of https://github.com/RGBCube/ZTerm synced 2025-07-29 08:57:46 +00:00

Refactor Spinner

This commit is contained in:
RGBCube 2023-05-17 23:23:56 +03:00
parent cc538aa18a
commit e9e4ba5529
2 changed files with 33 additions and 35 deletions

View file

@ -5,10 +5,13 @@ const std = @import("std");
const time = std.time;
pub fn main() !void {
var sp = Spinner.new(100 * time.ns_per_ms, null, "Loading...");
var sp = Spinner{
.loading_message = "Loading",
.finished_message = "Done",
};
try sp.start();
time.sleep(5 * time.ns_per_s);
time.sleep(3 * time.ns_per_s);
sp.stop();
try sp.stop();
}