DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   replacing windows functions with ubuntu linux (http://www.daniweb.com/forums/thread141568.html)

cam875 Aug 21st, 2008 12:01 pm
replacing windows functions with ubuntu linux
 
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.

iamthwee Aug 21st, 2008 12:27 pm
Re: replacing windows functions with ubuntu linux
 
sleep is in unistd.h

Salem Aug 21st, 2008 12:50 pm
Re: replacing windows functions with ubuntu linux
 
Don't forget the change of units, otherwise you'll be hibernating rather than sleeping ;)

Ancient Dragon Aug 21st, 2008 12:54 pm
Re: replacing windows functions with ubuntu linux
 
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.

cam875 Aug 21st, 2008 8:27 pm
Re: replacing windows functions with ubuntu linux
 
ok thanks for the help I do not use functions in the winapi very often so I should be fine afterall.


All times are GMT -4. The time now is 3:36 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC