about summary refs log tree commit diff
path: root/src/module.rs
blob: c859bd36ba1284d053f5311b22951519052e3a2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::error::Result;
use crate::facility::FacilityType;

use std::sync::{ Arc, Mutex };
use std::time::Duration;


pub use time::TimeModule;

pub mod time;


pub trait Module {
  const REQUIRED_FACILITIES: FacilityType;

  fn new() -> Result<Arc<Mutex<Self>>>;
  fn format(&mut self) -> String;
  fn sleep_duration(&self) -> Option<Duration>;
}