Expand description
Represention of a task event.
Examples
use std::time::Duration;
use timelog::{DateTime, TaskEvent};
let timestamp = DateTime::new((2022, 03, 14), (10, 0, 0)).expect("Invalid date or time");
let mut event = TaskEvent::new(
timestamp,
"project_1",
Duration::from_secs(300)
);
println!("{}", event.project());
event.add_dur(Duration::from_secs(3000));
println!("{:?}", event.duration());
Description
The TaskEvent
type represents a single task event containing a
start time and duration.
Structs
- Structure representing a single task event.