cleanup
This commit is contained in:
parent
2434764c9e
commit
6970b58fd1
@ -3,11 +3,8 @@ use chrono::prelude::*;
|
|||||||
pub fn get_sec() -> f64 {
|
pub fn get_sec() -> f64 {
|
||||||
let local: DateTime<Local> = Local::now();
|
let local: DateTime<Local> = Local::now();
|
||||||
|
|
||||||
let sec = (
|
(local.hour() * 3600 + local.minute() * 60 + local.second()
|
||||||
local.hour() * 3600 + local.minute() * 60 + local.second()
|
) as f64 + (local.nanosecond() as f64 / 1000000000.0)
|
||||||
) as f64 + (local.nanosecond() as f64 / 1000000000.0);
|
|
||||||
|
|
||||||
sec
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_timestamp() -> i64 {
|
pub fn get_timestamp() -> i64 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user