countrs 0.1.6

A simple countdown (or up!) with adjustable start and end times
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::errors::TimeOverflow;

pub trait Time {
    type Duration;

    fn now() -> Self;

    fn add(self, duration: Self::Duration) -> Result<Self, TimeOverflow>
    where
        Self: Sized;
}

pub trait TimeUnits {
    fn seconds(seconds: i64) -> Self;

    fn num_seconds(&self) -> i64;
}