[examples] Use instant crate's time::Instant

crates.io/crates/instant provides a std::time::Instant implementation
that works on both WASM and non-wasm builds.
This commit is contained in:
Arman Uguray 2023-04-23 11:57:38 -07:00
parent 8a35c51289
commit 5543ad01fe
4 changed files with 4 additions and 2 deletions

View file

@ -16,6 +16,7 @@ vello_svg = { path = "../../integrations/vello_svg" }
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] }
image = "0.24.5"
instant = "0.1.12"
# Used for the `download` command
byte-unit = "4.0"

View file

@ -1,10 +1,10 @@
use std::{
fs::read_dir,
path::{Path, PathBuf},
time::Instant,
};
use anyhow::{Ok, Result};
use instant::Instant;
use vello::{kurbo::Vec2, SceneBuilder, SceneFragment};
use vello_svg::usvg;

View file

@ -24,6 +24,7 @@ vello = { path = "../../", features = ["buffer_labels"] }
scenes = { path = "../scenes" }
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] }
instant = "0.1.12"
pollster = { workspace = true }
wgpu = { workspace = true }

View file

@ -14,8 +14,8 @@
//
// Also licensed under MIT license, at your choice.
use instant::Instant;
use std::collections::HashSet;
use std::time::Instant;
use anyhow::Result;
use clap::{CommandFactory, Parser};