mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
remove seconds_from_midnight from core egui input
It is only used by demo app, and so does not belong to egui proper. Instead it is now passed as part of a DemoEnvironment
This commit is contained in:
@@ -205,7 +205,7 @@ pub fn init_clipboard() -> Option<ClipboardContext> {
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// Time of day as seconds since midnight. Used for clock in demo app.
|
||||
pub fn local_time_of_day() -> f64 {
|
||||
pub fn seconds_since_midnight() -> f64 {
|
||||
use chrono::Timelike;
|
||||
let time = chrono::Local::now().time();
|
||||
time.num_seconds_from_midnight() as f64 + 1e-9 * (time.nanosecond() as f64)
|
||||
|
||||
Reference in New Issue
Block a user