Crates.io | quad-timestamp |
lib.rs | quad-timestamp |
version | 0.1.2 |
source | src |
created_at | 2022-10-14 17:47:11.142986 |
updated_at | 2023-01-15 20:33:31.95331 |
description | A simple timestamp library for miniquad/macroquad |
homepage | |
repository | https://github.com/FaunKr/quad-timestamp |
max_upload_size | |
id | 688439 |
size | 6,082 |
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.
Add this to your Cargo.toml
dependencies:
quad-timestamp = "0.1.1"
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>