Esempio n. 1
0
int
main(int argc, char *argv[]) {
    TimerThread *timer;
    timer = timer_thread_create(1, 1, handle_alarm);

    timer_thread_start(timer);
    printf("Timer status: %s\n",
        get_timer_status_str(get_timer_status(timer)));

    while (count != 20) usleep(10);
    printf("Requesting timer stop\n");
    timer_thread_stop(timer);
    printf("Timer status: %s\n",
        get_timer_status_string(get_timer_status(timer)));

    timer_thread_destroy(timer);
    return 0;
}
Esempio n. 2
0
File: timer.c Progetto: fshunj/LCUI
/* 停用定时器模块 */
LCUI_API void LCUIModule_Timer_End( void )
{
	timer_thread_destroy( LCUI_Sys.timer_thread, &global_timer_list );
}