#time #instant #performance #nodejs #measure

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

#103 in WebAssembly

Download history 3898/week @ 2024-01-24 3372/week @ 2024-01-31 4717/week @ 2024-02-07 4342/week @ 2024-02-14 4689/week @ 2024-02-21 3721/week @ 2024-02-28 4105/week @ 2024-03-06 4078/week @ 2024-03-13 5382/week @ 2024-03-20 3958/week @ 2024-03-27 4514/week @ 2024-04-03 4849/week @ 2024-04-10 4246/week @ 2024-04-17 4494/week @ 2024-04-24 5771/week @ 2024-05-01 4159/week @ 2024-05-08

19,684 downloads per month
Used in 53 crates (10 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–2MB
~40K SLoC