0

I have written a program in which there is a board and the balls should travel from one place to another.i need to provide a delay when i draw the ball in new position and erase it from previous position.I used delay() funtion on turbo c++.but on gcc compiler on linux i dont know how to provide delay.I used usleep() function but i cant see the successive movement of balls.what should i do?.please help..how do i write a delay loop

4
Contributors
4
Replies
6
Views
10 Years
Discussion Span
Last Post by harry pottervs
0

Well did you take account of the fact that usleep takes MICROSECONDS?

delay(1000); and usleep(1000); will wait for different times.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.