diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-12 11:24:43 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-21 05:19:49 +0100 |
commit | 4c97f3208a0ba185264a169e01d0b0d922266ea6 (patch) | |
tree | fe35d9da3e60f1169eb97242b1948ccb5f9341cd /apps/cassiopeia/src/data.rs | |
parent | d346c9f2f30041623e51b120e767b1ce02083e97 (diff) |
cassiopeia: adding API outline
Diffstat (limited to 'apps/cassiopeia/src/data.rs')
-rw-r--r-- | apps/cassiopeia/src/data.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/cassiopeia/src/data.rs b/apps/cassiopeia/src/data.rs index 3911345109ca..7442d699be88 100644 --- a/apps/cassiopeia/src/data.rs +++ b/apps/cassiopeia/src/data.rs @@ -5,7 +5,7 @@ //! analysis tasks. use crate::format::LineCfg; -use chrono::{DateTime, Duration, FixedOffset as Offset, NaiveDate}; +use chrono::{DateTime, Duration, Local, FixedOffset as Offset, NaiveDate}; use std::collections::BTreeMap; #[derive(Debug, Default)] @@ -38,6 +38,13 @@ impl TimeFile { fn get_last_session(&mut self) -> &mut Session { self.sessions.last_mut().unwrap() } + + /// Start a new session (optionally 15-minute rounded) + pub fn start(&mut self, round: bool) -> Option<()> { + let now = Local::now(); + + Some(()) + } } #[derive(Debug)] |