mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 10:49:26 +03:00
removed clay timer from unix.c
This commit is contained in:
parent
efb86a8d29
commit
1cd74683f0
@ -349,9 +349,7 @@
|
||||
/* u2_unix: clay support system, also
|
||||
*/
|
||||
typedef struct _u2_unix {
|
||||
uv_timer_t tim_u; // clay timer
|
||||
uv_check_t syn_u; // fs sync check
|
||||
u2_bean alm; // alarm
|
||||
u2_uhot* hot_u; // host state
|
||||
u2_usig* sig_u; // signal list
|
||||
#ifdef SYNCLOG
|
||||
@ -368,7 +366,7 @@
|
||||
/* u2_batz: just a timer for now
|
||||
*/
|
||||
typedef struct _u2_batz {
|
||||
uv_timer_t tim_u; // clay timer
|
||||
uv_timer_t tim_u; // batz timer
|
||||
c3_w run_w; // run of consecutive alarms
|
||||
u2_bean alm; // alarm
|
||||
} u2_batz;
|
||||
@ -376,7 +374,7 @@
|
||||
/* u2_temp: just a timer for ever
|
||||
*/
|
||||
typedef struct _u2_temp {
|
||||
uv_timer_t tim_u; // clay timer
|
||||
uv_timer_t tim_u; // temp timer
|
||||
c3_w run_w; // run of consecutive alarms
|
||||
u2_bean alm; // alarm
|
||||
} u2_temp;
|
||||
|
41
v/unix.c
41
v/unix.c
@ -1405,21 +1405,6 @@ _unix_ef_sync(uv_check_t* han_u)
|
||||
u2_lo_shut(u2_yes);
|
||||
}
|
||||
|
||||
/* _unix_time_cb(): timer callback.
|
||||
*/
|
||||
static void
|
||||
_unix_time_cb(uv_timer_t* tim_u)
|
||||
{
|
||||
u2_lo_open();
|
||||
{
|
||||
u2_reck_plan
|
||||
(u2A,
|
||||
u2nt(u2_blip, c3__clay, u2_nul),
|
||||
u2nc(c3__wake, u2_nul));
|
||||
}
|
||||
u2_lo_shut(u2_no);
|
||||
}
|
||||
|
||||
/* _unix_sign_cb: signal callback.
|
||||
*/
|
||||
static void
|
||||
@ -1475,9 +1460,6 @@ u2_unix_io_init(void)
|
||||
{
|
||||
u2_unix* unx_u = &u2_Host.unx_u;
|
||||
|
||||
uv_timer_init(u2L, &unx_u->tim_u);
|
||||
unx_u->alm = u2_no;
|
||||
|
||||
{
|
||||
u2_usig* sig_u;
|
||||
|
||||
@ -1552,27 +1534,4 @@ u2_unix_io_exit(void)
|
||||
void
|
||||
u2_unix_io_poll(void)
|
||||
{
|
||||
u2_unix* unx_u = &u2_Host.unx_u;
|
||||
u2_noun wen = u2_reck_keep(u2A, u2nt(u2_blip, c3__clay, u2_nul));
|
||||
|
||||
if ( (u2_nul != wen) &&
|
||||
(u2_yes == u2du(wen)) &&
|
||||
(u2_yes == u2ud(u2t(wen))) )
|
||||
{
|
||||
c3_d gap_d = u2_time_gap_ms(u2k(u2A->now), u2k(u2t(wen)));
|
||||
|
||||
if ( u2_yes == unx_u->alm ) {
|
||||
uv_timer_stop(&unx_u->tim_u);
|
||||
}
|
||||
else unx_u->alm = u2_yes;
|
||||
|
||||
uv_timer_start(&unx_u->tim_u, _unix_time_cb, gap_d, 0);
|
||||
}
|
||||
else {
|
||||
if ( u2_yes == unx_u->alm ) {
|
||||
uv_timer_stop(&unx_u->tim_u);
|
||||
}
|
||||
unx_u->alm = u2_no;
|
||||
}
|
||||
u2z(wen);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user