4 timer(envid_t ns_envid
, uint32_t initial_to
) {
6 uint32_t stop
= sys_time_msec() + initial_to
;
8 binaryname
= "ns_timer";
11 while((r
= sys_time_msec()) < stop
&& r
>= 0) {
15 panic("sys_time_msec: %e", r
);
17 ipc_send(ns_envid
, NSREQ_TIMER
, 0, 0);
21 to
= ipc_recv((int32_t *) &whom
, 0, 0);
23 if (whom
!= ns_envid
) {
24 cprintf("NS TIMER: timer thread got IPC message from env %x not NS\n", whom
);
28 stop
= sys_time_msec() + to
;