Skip to content

Commit

Permalink
core,web: Replace instant with web-time
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Oct 28, 2023
1 parent ac93947 commit 0c0b86c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ Ruffle depends on third-party libraries with compatible licenses.
| [indexmap](https://github.com/bluss/indexmap) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2016--2017 |
| [indicatif](https://github.com/mitsuhiko/indicatif) | [MIT](#MIT) | Copyright (c) 2017 Armin Ronacher <armin.ronacher@active-4.com> |
| [inplace_it](https://github.com/NotIntMan/inplace_it) | [MIT](#MIT) | Copyright (c) 2018 Dmitry Demin <shepardiwe@gmail.com> |
| [instant](https://github.com/sebcrozet/instant) | [BSD-3-Clause](#BSD-3-Clause) | Copyright (c) 2019, Sébastien Crozet |
| [iovec](https://github.com/carllerche/iovec) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2017 Carl Lerche |
| [isahc](https://github.com/sagebind/isahc) | [MIT](#MIT) | Copyright (c) 2019 Stephen M. Coakley |
| [itoa](https://github.com/dtolnay/itoa) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) David Tolnay <dtolnay@gmail.com> |
Expand Down Expand Up @@ -609,6 +608,7 @@ Ruffle depends on third-party libraries with compatible licenses.
| [wayland-sys](https://github.com/smithay/wayland-rs) | [MIT](#MIT) | Copyright (c) 2015 Victor Berger |
| [weak-table](https://github.com/tov/weak-table-rs) | [MIT](#MIT) | Copyright (c) 2018 Jesse A. Tov |
| [web-sys](https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2014 Alex Crichton |
| [web-time](https://github.com/daxpedda/web-time) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2023 dAxpeDDa <daxpedda@gmail.com> |
| [webbrowser](https://github.com/amodm/webbrowser-rs) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2015 Amod Malviya |
| [webpki](https://github.com/briansmith/webpki) | Custom ISC-style | Copyright 2015 Brian Smith. |
| [webpki-roots](https://github.com/ctz/webpki-roots) | [MPL-2.0](#MPL-20) | Copyright (c) Joseph Birr-Pixton <jpixton@gmail.com> |
Expand Down
3 changes: 1 addition & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ weak-table = "0.3.2"
percent-encoding = "2.3.0"
thiserror = "1.0"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
instant = "0.1"
web-time = "0.2.3"
encoding_rs = "0.8.33"
rand = { version = "0.8.5", features = ["std", "small_rng"], default-features = false }
serde = { version = "1.0.189", features = ["derive"] }
Expand Down Expand Up @@ -68,7 +68,6 @@ version = "0.4.37"
[features]
default = []
lzma = ["lzma-rs", "swf/lzma"]
wasm-bindgen = ["instant/wasm-bindgen"]
avm_debug = []
deterministic = []
timeline_debug = []
Expand Down
2 changes: 1 addition & 1 deletion core/src/avm1/activation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::vminterface::Instantiator;
use crate::{avm_error, avm_warn};
use gc_arena::{Gc, GcCell, Mutation};
use indexmap::IndexMap;
use instant::Instant;
use rand::Rng;
use smallvec::SmallVec;
use std::borrow::Cow;
Expand All @@ -26,6 +25,7 @@ use std::fmt;
use swf::avm1::read::Reader;
use swf::avm1::types::*;
use url::form_urlencoded;
use web_time::Instant;

use super::object_reference::MovieClipReference;

Expand Down
2 changes: 1 addition & 1 deletion core/src/avm2/globals/flash/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::avm2::object::TObject;
use crate::avm2::{Activation, Error, Object, Value};
use crate::string::AvmString;
use crate::string::WString;
use instant::Instant;
use std::fmt::Write;
use web_time::Instant;

pub mod byte_array;
pub mod dictionary;
Expand Down
2 changes: 1 addition & 1 deletion core/src/backend/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ mod decoders {
}
}

use instant::Duration;
use thiserror::Error;
use web_time::Duration;

pub type SoundHandle = Index;
pub type SoundInstanceHandle = Index;
Expand Down
2 changes: 1 addition & 1 deletion core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use crate::tag_utils::{SwfMovie, SwfSlice};
use crate::timer::Timers;
use core::fmt;
use gc_arena::{Collect, Mutation};
use instant::Instant;
use rand::rngs::SmallRng;
use ruffle_render::backend::{BitmapCacheEntry, RenderBackend};
use ruffle_render::commands::CommandList;
Expand All @@ -37,6 +36,7 @@ use ruffle_video::backend::VideoBackend;
use std::collections::{HashMap, VecDeque};
use std::sync::{Arc, Mutex, Weak};
use std::time::Duration;
use web_time::Instant;

/// Minimal context, useful for manipulating the GC heap.
pub struct GcContext<'a, 'gc> {
Expand Down
2 changes: 1 addition & 1 deletion core/src/display_object/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ use crate::display_object::{
use crate::events::{ClipEvent, ClipEventResult};
use bitflags::bitflags;
use gc_arena::{Collect, Mutation};
use instant::Instant;
use ruffle_macros::enum_trait_object;
use std::cell::{Ref, RefMut};
use std::fmt::Debug;
use std::time::Duration;
use swf::{Point, Twips};
use web_time::Instant;

/// Find the lowest common ancestor between the display objects in `from` and
/// `to`.
Expand Down
2 changes: 1 addition & 1 deletion core/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ use crate::timer::Timers;
use crate::vminterface::Instantiator;
use crate::DefaultFont;
use gc_arena::{Collect, DynamicRootSet, GcCell, Rootable};
use instant::Instant;
use rand::{rngs::SmallRng, SeedableRng};
use ruffle_render::backend::{null::NullRenderer, RenderBackend, ViewportDimensions};
use ruffle_render::commands::CommandList;
Expand All @@ -64,6 +63,7 @@ use std::str::FromStr;
use std::sync::{Arc, Mutex, Weak};
use std::time::Duration;
use tracing::{info, instrument};
use web_time::Instant;

/// The newest known Flash Player version, serves as a default to
/// `player_version`.
Expand Down
2 changes: 1 addition & 1 deletion web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gloo-net = { version = "0.4.0", default-features = false, features = ["websocke

[dependencies.ruffle_core]
path = "../core"
features = ["audio", "mp3", "nellymoser", "wasm-bindgen", "default_compatibility_rules", "default_font"]
features = ["audio", "mp3", "nellymoser", "default_compatibility_rules", "default_font"]

[dependencies.web-sys]
version = "0.3.64"
Expand Down
2 changes: 1 addition & 1 deletion web/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ Ruffle depends on third-party libraries with compatible licenses.
| [indexmap](https://github.com/bluss/indexmap) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2016--2017 |
| [indicatif](https://github.com/mitsuhiko/indicatif) | [MIT](#MIT) | Copyright (c) 2017 Armin Ronacher <armin.ronacher@active-4.com> |
| [inplace_it](https://github.com/NotIntMan/inplace_it) | [MIT](#MIT) | Copyright (c) 2018 Dmitry Demin <shepardiwe@gmail.com> |
| [instant](https://github.com/sebcrozet/instant) | [BSD-3-Clause](#BSD-3-Clause) | Copyright (c) 2019, Sébastien Crozet |
| [iovec](https://github.com/carllerche/iovec) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2017 Carl Lerche |
| [isahc](https://github.com/sagebind/isahc) | [MIT](#MIT) | Copyright (c) 2019 Stephen M. Coakley |
| [itoa](https://github.com/dtolnay/itoa) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) David Tolnay <dtolnay@gmail.com> |
Expand Down Expand Up @@ -607,6 +606,7 @@ Ruffle depends on third-party libraries with compatible licenses.
| [wayland-sys](https://github.com/smithay/wayland-rs) | [MIT](#MIT) | Copyright (c) 2015 Victor Berger |
| [weak-table](https://github.com/tov/weak-table-rs) | [MIT](#MIT) | Copyright (c) 2018 Jesse A. Tov |
| [web-sys](https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2014 Alex Crichton |
| [web-time](https://github.com/daxpedda/web-time) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2023 dAxpeDDa <daxpedda@gmail.com> |
| [webbrowser](https://github.com/amodm/webbrowser-rs) | [Apache-2.0](#Apache-20)/[MIT](#MIT) | Copyright (c) 2015 Amod Malviya |
| [webpki](https://github.com/briansmith/webpki) | Custom ISC-style | Copyright 2015 Brian Smith. |
| [webpki-roots](https://github.com/ctz/webpki-roots) | [MPL-2.0](#MPL-20) | Copyright (c) Joseph Birr-Pixton <jpixton@gmail.com> |
Expand Down

0 comments on commit 0c0b86c

Please sign in to comment.