quad-timestamp

Crates.ioquad-timestamp
lib.rsquad-timestamp
version0.1.2
sourcesrc
created_at2022-10-14 17:47:11.142986
updated_at2023-01-15 20:33:31.95331
descriptionA simple timestamp library for miniquad/macroquad
homepage
repositoryhttps://github.com/FaunKr/quad-timestamp
max_upload_size
id688439
size6,082
(FaunKr)

documentation

https://docs.rs/quad-timestamp/

README

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> 
Commit count: 11

cargo fmt