Skip to main content

Module stopwatch

Module stopwatch 

Source
Expand description

Stopwatch component for tracking elapsed time.

This module provides a stopwatch that counts up from zero, useful for measuring elapsed time in TUI applications.

§Example

use bubbles::stopwatch::Stopwatch;
use std::time::Duration;

let stopwatch = Stopwatch::new();
assert_eq!(stopwatch.elapsed(), Duration::ZERO);
assert!(!stopwatch.running());

Structs§

ResetMsg
Message to reset the stopwatch.
StartStopMsg
Message to start or stop the stopwatch.
Stopwatch
Stopwatch model.
TickMsg
Message sent on every stopwatch tick.