I'm using allegro(gl), and I like using allegro(gl).
But I don't like having to put loops in to create a waiting type sequence in the code.
Is there a way to implement windows.h without having 5000million errors?
I'm using allegro(gl), and I like using allegro(gl).
But I don't like having to put loops in to create a waiting type sequence in the code.
Is there a way to implement windows.h without having 5000million errors?
Don't use the sleep function. Make your own function.
void awesomeWaitFunction(const unsigned int& delayMs)
{
unsigned int start = (float(clock())/CLOCK_PER_SEC)*1000;
while((float(clock())/CLOCK_PER_SEC)*1000 < start+delayMs);
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.