将smoltcp升级到0.11.0版本 (#740)

This commit is contained in:
yuyi2439
2024-04-21 11:39:00 +08:00
committed by GitHub
parent 370472f728
commit 881ff6f95e
5 changed files with 65 additions and 76 deletions

View File

@ -6,7 +6,7 @@ use core::{
use crate::arch::CurrentTimeArch;
use self::{timekeep::ktime_get_real_ns, timekeeping::getnstimeofday};
use self::timekeeping::getnstimeofday;
pub mod clocksource;
pub mod jiffies;
@ -225,7 +225,8 @@ impl Instant {
/// Create a new `Instant` from the current time
pub fn now() -> Instant {
Self::from_micros(ktime_get_real_ns() / 1000)
let tm = getnstimeofday();
Self::from_micros(tm.tv_sec * 1000000 + tm.tv_nsec / 1000)
}
/// The fractional number of milliseconds that have passed