1
0
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:
Emil Ernerfeldt
2020-09-23 08:57:23 +02:00
parent b84642374b
commit b77151fb64
7 changed files with 63 additions and 45 deletions

View File

@@ -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)