(bind-func scheduler_at:[SchedEvt*,SchedEvt*,!a]*
(let ((prev:SchedEvt* null))
(lambda (evtlist time)
(set! prev null)
(while (and (not (null? evtlist))
(<= (tref evtlist 0) time))
(set! prev evtlist)
(set! evtlist (tref evtlist 3)))
prev)))