Ok so I am going to be switching to an ubuntu linux machine soon to do all of my coding and I was wondering if anyone has a reference to the function calls you can use with it because I am used to windows programming so now in my code

Sleep(3000);

becomes useless so I need to start finding alternatives. All help is appreciated.

Member Avatar for iamthwee

sleep is in unistd.h

Don't forget the change of units, otherwise you'll be hibernating rather than sleeping ;)

commented: Amen sleep(3000) ain't the same in windows. +17

sleep takes parameter in seconds -- I think there is a usleep that is in milliseconds.

If you stick to standard c++ code there should not be a problem. But if you use a lot of win32 api graphics functions then you are in deep shit. Most of that is comletely different in the *nix world. My advice is to use a portable library, such as wxWidgets or QT.

ok thanks for the help I do not use functions in the winapi very often so I should be fine afterall.

Be a part of the DaniWeb community

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