#performance #nodejs #time #instant #measure-time #web-performance

trice

A minimal replacement for std::time::Instant that works in WASM for the web and Node.js

5 releases (3 breaking)

0.4.0 Jan 4, 2024
0.3.1 Mar 26, 2023
0.3.0 Mar 8, 2023
0.2.0 Jan 10, 2023
0.1.0 Feb 17, 2022

#272 in WebAssembly

Download history 4406/week @ 2024-08-02 4788/week @ 2024-08-09 5036/week @ 2024-08-16 4547/week @ 2024-08-23 4549/week @ 2024-08-30 4550/week @ 2024-09-06 4510/week @ 2024-09-13 4710/week @ 2024-09-20 4071/week @ 2024-09-27 3993/week @ 2024-10-04 3659/week @ 2024-10-11 4568/week @ 2024-10-18 3917/week @ 2024-10-25 4057/week @ 2024-11-01 4387/week @ 2024-11-08 5469/week @ 2024-11-15

18,656 downloads per month
Used in 74 crates (12 directly)

Apache-2.0

9KB
64 lines

Trice

Trice is a minimal replacement for std::time::Instant that works in WASM for the web and Node.js, enabling time measurement and performance calculations.

docs.rs Crates.io

Features

  • Replacement for std::time::Instant
  • Uses performance.now() in WASM environments
  • Uses std::time::Instant in normal environments

Dependencies

~0–2.3MB
~43K SLoC