clock-timer 0.2.7

A clock crate that offer a timer and a stopwatch to use in your apps
Documentation
[package]
name = "clock-timer"
version = "0.2.7"
edition = "2024"
description = "A clock crate that offer a timer and a stopwatch to use in your apps"
license = "MIT"


[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
# Dependencies common to both native and Wasm (like Instant, Duration)
# No specific dependencies needed here for the core logic, as they are in std.

# Native-specific dependencies
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ctrlc = { version = "3.4", features = [
    "termination",
] } # For Ctrl+C handling in native


# ALL WebAssembly-specific dependencies go under this SINGLE header
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
web-sys = { version = "0.3.77", features = ["console", "Window"] }
wasm-bindgen-futures = "0.4"
console_error_panic_hook = { version = "0.1.7", optional = true }  # Moved here from a separate section


[features]
default = []
# Feature to enable console_error_panic_hook for wasm builds
console_error_panic_hook = ["dep:console_error_panic_hook"]