diff --git a/examples/timer/main.c b/examples/timer/main.c index 1c3de3c45..d1b80b973 100644 --- a/examples/timer/main.c +++ b/examples/timer/main.c @@ -4,7 +4,6 @@ #include "../../ui.h" uiMultilineEntry *e; -int n = 0, n2 = 0; int sayTime(void *data) { @@ -15,37 +14,8 @@ int sayTime(void *data) s = ctime(&t); uiMultilineEntryAppend(e, s); - n++; - return n < 5; -} - -int sayTime42(void *data) -{ - uiMultilineEntryAppend(e, "42!\n"); return 1; } -/* -[] 0 -+[1] 1 -+[1, 2] 2 --[2] 1 -+[2, 3] FAIL - -*/ -int sayTime5(void *data) -{ - time_t t; - char *s; - - t = time(NULL); - s = ctime(&t); - - uiMultilineEntryAppend(e, s); - n2++; - if (n2 == 2) - uiTimer(1500, sayTime42, NULL); - return n2 < 3; -} int onClosing(uiWindow *w, void *data) { @@ -86,7 +56,6 @@ int main(void) uiBoxAppend(b, uiControl(e), 1); uiTimer(1000, sayTime, NULL); - uiTimer(5000, sayTime5, NULL); uiWindowOnClosing(w, onClosing, NULL); uiControlShow(uiControl(w));