From dcb45d74661e4e951a3d07e76c603c0923791617 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 25 Apr 2020 12:59:57 +0800 Subject: [PATCH] use global timer --- runtime/src/comms.rs | 7 +++---- runtime/src/main.rs | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/runtime/src/comms.rs b/runtime/src/comms.rs index 6709293..23b2ea9 100644 --- a/runtime/src/comms.rs +++ b/runtime/src/comms.rs @@ -16,6 +16,7 @@ use libboard_zynq::{ iface::{NeighborCache, EthernetInterfaceBuilder, Routes}, time::Instant, }, + timer::GlobalTimer, }; use libsupport_zynq::alloc::{vec, vec::Vec}; use libasync::{smoltcp::{Sockets, TcpStream}, task}; @@ -152,7 +153,7 @@ async fn handle_connection(stream: &TcpStream, control: Rc &str { #[no_mangle] pub fn main_core0() { + let timer = GlobalTimer::start(); let _ = logger::init(); log::set_max_level(log::LevelFilter::Debug); info!("NAR3 starting..."); @@ -50,5 +52,5 @@ pub fn main_core0() { info!("Detected gateware: {}", identifier_read(&mut [0; 64])); - comms::main(); + comms::main(timer); }