mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
chrono works both natively and on web. Related: https://github.com/emilk/egui/issues/212
This commit is contained in:
@@ -62,12 +62,6 @@ pub fn now_sec() -> f64 {
|
||||
/ 1000.0
|
||||
}
|
||||
|
||||
pub fn seconds_since_midnight() -> f64 {
|
||||
let d = js_sys::Date::new_0();
|
||||
let seconds = (d.get_hours() * 60 + d.get_minutes()) * 60 + d.get_seconds();
|
||||
seconds as f64 + 1e-3 * (d.get_milliseconds() as f64)
|
||||
}
|
||||
|
||||
pub fn screen_size_in_native_points() -> Option<egui::Vec2> {
|
||||
let window = web_sys::window()?;
|
||||
Some(egui::Vec2::new(
|
||||
|
||||
Reference in New Issue
Block a user