aboutsummaryrefslogtreecommitdiff
path: root/karlc/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'karlc/src/main.rs')
-rw-r--r--karlc/src/main.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/karlc/src/main.rs b/karlc/src/main.rs
index 501ef3c..4501c56 100644
--- a/karlc/src/main.rs
+++ b/karlc/src/main.rs
@@ -96,7 +96,30 @@ fn main() {
print!(" \x1b[38;2;100;255;100mSchedule: \x1b[0m");
match t.schedule {
Schedule::Never => println!("\x1b[3m\x1b[2m(never)\x1b[0m"),
- Schedule::Dynamic { .. } => todo!(),
+ Schedule::Dynamic {
+ duration,
+ priority,
+ scheduled,
+ ..
+ } => {
+ // TODO dont ignore condition
+ println!("dynamicly scheduled",);
+ println!(" \x1b[38;2;100;255;100mPriority:\x1b[0m {priority}");
+ println!(
+ " \x1b[38;2;100;255;100mDuration:\x1b[0m {:?}",
+ std::time::Duration::from_secs(duration as u64)
+ );
+ println!(
+ " \x1b[38;2;100;255;100mScheduled for:\x1b[0m {}",
+ scheduled
+ .map(|r| format!(
+ "{} - {}",
+ NaiveDateTime::from_timestamp(r.start, 0),
+ NaiveDateTime::from_timestamp(r.end, 0)
+ ))
+ .unwrap_or("...".to_string())
+ );
+ }
Schedule::Static(t) => {
println!(
"from {} to {}",