#nodejs #performance #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

#281 in WebAssembly

Download history 3622/week @ 2024-07-21 4404/week @ 2024-07-28 4970/week @ 2024-08-04 4830/week @ 2024-08-11 4890/week @ 2024-08-18 4399/week @ 2024-08-25 4538/week @ 2024-09-01 4672/week @ 2024-09-08 4474/week @ 2024-09-15 4623/week @ 2024-09-22 4396/week @ 2024-09-29 3401/week @ 2024-10-06 4170/week @ 2024-10-13 4224/week @ 2024-10-20 3910/week @ 2024-10-27 3789/week @ 2024-11-03

16,452 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