#[ cfg( not( feature = "no_std" ) ) ]
use std::time;
#[ cfg( not( feature = "no_std" ) ) ]
pub fn now() -> i64
{
time::SystemTime::now()
.duration_since( time::UNIX_EPOCH ).unwrap()
.as_millis() as i64
}
pub mod s
{
use super::*;
#[ cfg( not( feature = "no_std" ) ) ]
pub fn now() -> i64
{
time::SystemTime::now()
.duration_since( time::UNIX_EPOCH ).unwrap()
.as_secs() as i64
}
}
pub mod ms
{
use super::*;
#[ cfg( not( feature = "no_std" ) ) ]
pub fn now() -> i64
{
time::SystemTime::now()
.duration_since( time::UNIX_EPOCH ).unwrap()
.as_millis() as i64
}
}
pub mod ns
{
use super::*;
#[ cfg( not( feature = "no_std" ) ) ]
pub fn now() -> i64
{
time::SystemTime::now()
.duration_since( time::UNIX_EPOCH ).unwrap()
.as_nanos() as i64
}
}