3 releases

0.1.2 Jan 15, 2023
0.1.1 Oct 14, 2022
0.1.0 Oct 14, 2022

#15 in #miniquad

MIT license

5KB
62 lines

quad-timestamp

Docs Crates.io version

This is a crate which enables you to get an unix timestamp in miniquad/macroquad while running in a WASM environment. In any other envoirment it will fallback to chrono to aquire a timestamp.

Usage

Add this to your Cargo.toml dependencies:

quad-timestamp = "0.1.1"

Usage in WASM

Add file js/quad-timestamp.js to your project.

Add this line after loading of gl.js and before loading of your wasm in your index.html:

<script src="quad-timestamp.js"></script> 

Dependencies

~0–280KB