I had issues implementing the attack speed because it requires the current time, and WebAssembly doesn't have the concept of date time that I'm aware of (or at least Rust's std lib for it).
I ended up sending up the current epochmilli from the client as an i32 and used that to check the timings, which seems to work well enough for this.
I've been making a text adventure as my first Rust project and really enjoying it. Maybe one day I'll turn it into a crate for making text games that compile to both CLI and WASM.
I had issues implementing the attack speed because it requires the current time, and WebAssembly doesn't have the concept of date time that I'm aware of (or at least Rust's std lib for it).
I ended up sending up the current epochmilli from the client as an i32 and used that to check the timings, which seems to work well enough for this.