time_duration_api 0.1.0

This crate provides a time/duration API for Rust
Documentation

This crate provides a time/duration API for Rust.

jeninsutradhar@gmail.com

Examples

use time_duration_api::time_duration::{Time, CustomDuration};

// Create a new Time instance representing the current time
let current_time = Time::now();

// Format the time as a string
let formatted_time = current_time.format("%Y-%m-%d %H:%M:%S");

println!("Current time: {}", formatted_time);

// Create a custom duration of 5 seconds
let duration = CustomDuration::from_secs(5);

println!("Duration: {:?}", duration.duration);