hi friends i want a delay of 100 milliseconds in my program as their is delay function in dos.h
likewise i want to know is there any function in c++ for delay of some milliseconds im using ubuntu.

Recommended Answers

All 2 Replies

I am not a Linux programmer but I think Sleep(time); function is everywhere.
And this should also work if there is not Sleep();

include <time.h>
void sleep(clock_t wait)
{
clock_t goal;
goal = wait + clock();
while( goal > clock() )
;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.