test/testtimer.c
changeset 766 ed57c876700d
parent 0 74212992fb08
child 1151 be9c9c8f6d53
equal deleted inserted replaced
765:4c2ba6161939 766:ed57c876700d
    61 	
    61 	
    62 	/* Test multiple timers */
    62 	/* Test multiple timers */
    63 	printf("Testing multiple timers...\n");
    63 	printf("Testing multiple timers...\n");
    64 	t1 = SDL_AddTimer(100, callback, (void*)1);
    64 	t1 = SDL_AddTimer(100, callback, (void*)1);
    65 	if(!t1)
    65 	if(!t1)
    66 	  fprintf(stderr,"Could not create timer 1\n");
    66 	  fprintf(stderr,"Could not create timer 1: %s\n", SDL_GetError());
    67 	t2 = SDL_AddTimer(50, callback, (void*)2);
    67 	t2 = SDL_AddTimer(50, callback, (void*)2);
    68 	if(!t2)
    68 	if(!t2)
    69 	  fprintf(stderr,"Could not create timer 2\n");
    69 	  fprintf(stderr,"Could not create timer 2: %s\n", SDL_GetError());
    70 	t3 = SDL_AddTimer(233, callback, (void*)3);
    70 	t3 = SDL_AddTimer(233, callback, (void*)3);
    71 	if(!t3)
    71 	if(!t3)
    72 	  fprintf(stderr,"Could not create timer 3\n");
    72 	  fprintf(stderr,"Could not create timer 3: %s\n", SDL_GetError());
    73 	
    73 	
    74 	/* Wait 10 seconds */
    74 	/* Wait 10 seconds */
    75 	printf("Waiting 10 seconds\n");
    75 	printf("Waiting 10 seconds\n");
    76 	SDL_Delay(10*1000);
    76 	SDL_Delay(10*1000);
    77 
    77