Web Instant

Provides Spot, a version of Instant that works both on desktop and the web. On desktop, the internal representation uses std::time::Instant. On the web, the internal representation is an f64, and uses js_sys::Date methods to cover functinality where required

Install

cargo add web_instant

Usage

```rust use web_instant::Spot; use std::time::Duration;

fn mycrossplatformtimer(lasttime: Spot) { let timediff: Duration = Spot::now() - lasttime; println!("It has been {} seconds", timediff.assecs()); } ```