Skip to main content

Module pause

Module pause 

Source
Expand description

Pause data management and formatting utilities.

Provides the core data structures and formatting functionality for handling break periods detected by the activity monitor.

§Features

  • Data Modeling: Represents pause periods with precise timing information
  • Display Formatting: Converts raw pause data into human-readable formats
  • Collection Processing: Batch operations on pause collections
  • Report Integration: Provides data structures suitable for reporting systems

§Usage

use kasl::libs::pause::Pause;
use chrono::{NaiveDateTime, Duration};

let pause = Pause::detected(
    1,
    NaiveDateTime::parse_from_str("2025-08-11 09:15:00", "%Y-%m-%d %H:%M:%S")?,
    Some(NaiveDateTime::parse_from_str("2025-08-11 09:30:00", "%Y-%m-%d %H:%M:%S")?),
    Some(Duration::minutes(15)),
);

Structs§

Pause
Represents a single pause period with complete timing information.