|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 549 (0x225) Types: TextFile Names: »alarm.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Challenge/alarm.c«
#ifdef TIMER #include "challenge.h" int do_alarm = FALSE; set_alarm() { seconds = 0; minutes = 0; do_alarm = TRUE; alarm(1); } end_alarm() { do_alarm = FALSE; alarm(0); } timer() { if(do_alarm) { if(demo == HUMAN) { move(COMMAND_LINE, COMMAND_POS + 17); } else { move(COMMAND_LINE, COMMAND_POS + 12); } if((seconds += TIMER) >= 60) { minutes += seconds / 60; seconds %= 60; } printw("(%d:%.2d)", minutes, seconds); move(COMMENT_LINE, 1); clrtoeol(); refresh(); alarm(1); } } #endif