ticktime 0.1.0

Provides a ticktime struct to convert a tick to an in game date time
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ticktime::*;

fn main() {
    // Initialize a real ticktime where one tick is 3600 seconds
    let mut ticktime = TickTime::init(
        0, TickTimeOptions {
            tick_time_type: TickTimeType::EarthLike { seconds_per_tick: 3600, month_type: EarthLikeMonthType::Real },
            compute_events: false,
        }).unwrap();

    // Calling tick to simulate 40 days
    for _ in 0..(24 * 40) {
        ticktime.tick();
    }

    println!("{}", ticktime.to_string()); // Month 1, Day 9
}