#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

#406 in WebAssembly

Download history 5494/week @ 2024-11-16 6307/week @ 2024-11-23 5386/week @ 2024-11-30 4156/week @ 2024-12-07 4726/week @ 2024-12-14 2907/week @ 2024-12-21 2650/week @ 2024-12-28 5148/week @ 2025-01-04 5999/week @ 2025-01-11 4903/week @ 2025-01-18 3643/week @ 2025-01-25 5132/week @ 2025-02-01 5429/week @ 2025-02-08 4458/week @ 2025-02-15 4976/week @ 2025-02-22 4329/week @ 2025-03-01

20,107 downloads per month
Used in 89 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