Thread: unistd.h

  1. #1
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718

    unistd.h

    Is unistd.h available with Linux compilers only, or is it available on Windows compilers too?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Is unistd.h available with Linux compilers only
    Yes or no, depending on how broad your definition of Linux is.

    >or is it available on Windows compilers too?
    That would be nice...
    My best code is written with the delete key.

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >Yes or no, depending on how broad your definition of Linux is.
    I meant GCC, but I guess I wasn't clear enough (at all).

    >That would be nice...
    Dang. I guess I'll take that as a no.

    In that case, does anyone know of anything like the usleep function in unistd.h for Windows? (For those who don't know, usleep gives you microsecond-level control over sleep time).
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >does anyone know of anything like the usleep function in unistd.h for Windows?
    I believe that DJGPP supports usleep. For other compilers you'll probably have to write your own by calling something like QueryPerformanceCounter.
    My best code is written with the delete key.

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Ahh screw it. I'll just stick with what time.h offers me.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >I'll just stick with what time.h offers me.
    Wuss.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Header file location confusion
    By Pele in forum C Programming
    Replies: 6
    Last Post: 09-13-2006, 03:16 PM
  2. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 09:05 AM
  3. Is this a compiler Issue?
    By kinghajj in forum C Programming
    Replies: 8
    Last Post: 07-17-2003, 05:06 AM