#seconds #milliseconds #time #conversion #convert

no-std ms_to_secs

A simple Rust library to convert milliseconds to seconds

3 releases

new 0.1.2 Oct 31, 2024
0.1.1 Oct 29, 2024
0.1.0 Oct 28, 2024

#147 in No standard library

Download history 171/week @ 2024-10-24

171 downloads per month

MIT license

3KB

ms_to_secs

ms_to_secs is a simple Rust library that converts milliseconds to seconds as an f64 value. This crate is designed for quick, lightweight time conversions, making it useful for time-based calculations in various applications.

Installation

To use ms_to_secs, add it to your Cargo.toml:

[dependencies] ms_to_secs = "0.1.0"

use ms_to_secs::ms_to_secs;

fn main() {
    let seconds = ms_to_secs(1500);
    println!("1500 milliseconds is {} seconds", seconds); // Outputs: 1.5 seconds
}

Features

Converts milliseconds (u64) to seconds as a f64 value Lightweight and easy to use

License

This project is licensed under the MIT License

Author

Ben Santora (bensatlantik@gmail.com)

No runtime deps