pub trait NewTimer {
    // Required method
    fn new_timer(
        &mut self,
        func: &mut fn(),
        millis: i64
    ) -> Rc<RefCell<dyn RPCTimerBase>>;
}

Required Methods§

source

fn new_timer( &mut self, func: &mut fn(), millis: i64 ) -> Rc<RefCell<dyn RPCTimerBase>>

| Factory function for timers. | | RPC will call the function to create | a timer that will call func in millis | milliseconds. | | ———– | @note | | As the RPC mechanism is backend-neutral, | it can use different implementations | of timers. | | This is needed to cope with the case in | which there is no HTTP server, but only | GUI RPC console, and to break the dependency | of pcserver on httprpc. |

Implementors§