#instant #measure #performance #time #wasm

trice

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

4 releases (2 breaking)

new 0.3.1 Mar 26, 2023
0.3.0 Mar 8, 2023
0.2.0 Jan 10, 2023
0.1.0 Feb 17, 2022

#300 in WebAssembly

Download history 637/week @ 2022-12-07 635/week @ 2022-12-14 768/week @ 2022-12-21 678/week @ 2022-12-28 1058/week @ 2023-01-04 747/week @ 2023-01-11 754/week @ 2023-01-18 763/week @ 2023-01-25 550/week @ 2023-02-01 749/week @ 2023-02-08 787/week @ 2023-02-15 953/week @ 2023-02-22 1253/week @ 2023-03-01 1367/week @ 2023-03-08 1231/week @ 2023-03-15 1155/week @ 2023-03-22

5,140 downloads per month
Used in 8 crates (via surrealdb)

Apache-2.0

9KB
56 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
~39K SLoC