Skip to content

Commit

Permalink
fix: revert from instant crate as it is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
Captainfl4me committed May 6, 2024
1 parent 5c48b7b commit 6b56d7e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name = "spline-drawer"
version = "0.1.0"
edition = "2021"

[dependencies]
instant = { version = "0.1.12", features = [ "stdweb" ] }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.raylib]
version = "5.0.0"
git = "https://github.com/Captainfl4me/raylib-rs"
Expand Down
23 changes: 1 addition & 22 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,6 @@ mod scenes;
mod colors;
use colors::*;

/* let current_fps_text = format!("{} FPS", rl_draw_handle.get_fps());
rl_draw_handle.draw_text(
current_fps_text.as_str(),
screen_width - rl_draw_handle.measure_text(current_fps_text.as_str(), 14) - 30,
20,
14,
COLOR_GREEN,
);
if clock_divider == 0 {
current_draw_time_text = format!("{:?}", draw_time_start.elapsed().unwrap());
}
rl_draw_handle.draw_text(
current_draw_time_text.as_str(),
screen_width - rl_draw_handle.measure_text(current_draw_time_text.as_str(), 14) - 30,
50,
14,
COLOR_LIGHT,
);
*/

fn main() {
let (mut rl_handle, rl_thread) = raylib::init()
.size(640, 480)
Expand Down Expand Up @@ -80,7 +59,7 @@ fn main() {
draw_background(&mut rl_draw_handle, &background_tile_texture);

if let Some(scene_id) = current_scene {
let draw_time_start = instant::Instant::now();
let draw_time_start = std::time::Instant::now();
scenes[scene_id].draw(&mut rl_draw_handle);

// Draw draw time at smaller pace than actual FPS to be able to read it.
Expand Down

0 comments on commit 6b56d7e

Please sign in to comment.