Linux program use times() to Windows

Discussion in 'C Programming' started by Davy, Dec 11, 2005.

  1. Davy

    Davy Guest

    Hi all,

    I am reading a book "Computer Systems A progammer's Perspective"(
    http://csapp.cs.cmu.edu/public/students.html ).
    The book have a chapter talking about Memory and have a sample program(
    http://csapp.cs.cmu.edu/public/mountain.tar ).
    I want to use it in VC6.0 and windows.

    But the program use a <sys/times.h> times()
    (http://www.die.net/doc/linux/man/man2/times.2.html). It seems cannot
    be compiled in VC6.0.
    Is there any counterpart function in Windows?

    BTW, where to discuss Linux program port to Windows?

    Any suggestions will be appreciated!
    Best regards,
    Davy
    Davy, Dec 11, 2005
    #1
    1. Advertising

  2. Davy

    Tim Prince Guest

    Davy wrote:
    > Hi all,
    >
    > I am reading a book "Computer Systems A progammer's Perspective"(
    > http://csapp.cs.cmu.edu/public/students.html ).
    > The book have a chapter talking about Memory and have a sample program(
    > http://csapp.cs.cmu.edu/public/mountain.tar ).
    > I want to use it in VC6.0 and windows.
    >
    > But the program use a <sys/times.h> times()
    > (http://www.die.net/doc/linux/man/man2/times.2.html). It seems cannot
    > be compiled in VC6.0.

    nor in Standard C, the topic of this NG. It's labeled as a posix
    function in my man page.
    > Is there any counterpart function in Windows?

    Of course, if you invoke one of various varieties of posix emulation.
    Both Windows-specific details and posix are outside the scope of c.l.c.
    How about trying Google et al, or, if you wish to make the examples
    even less portable, look up your Windows API documentatation.
    >
    > BTW, where to discuss Linux program port to Windows?

    on forums specific to your chosen compiler, should you think it worth
    the hassle.
    Tim Prince, Dec 11, 2005
    #2
    1. Advertising

  3. Davy wrote:

    > Hi all,
    >
    > I am reading a book "Computer Systems A progammer's Perspective"(
    > http://csapp.cs.cmu.edu/public/students.html ).
    > The book have a chapter talking about Memory and have a sample program(
    > http://csapp.cs.cmu.edu/public/mountain.tar ).
    > I want to use it in VC6.0 and windows.
    >
    > But the program use a <sys/times.h> times()
    > (http://www.die.net/doc/linux/man/man2/times.2.html). It seems cannot
    > be compiled in VC6.0.
    > Is there any counterpart function in Windows?
    >
    > BTW, where to discuss Linux program port to Windows?


    Try cygwin + a windows version of gcc
    Marc Dansereau, Dec 11, 2005
    #3
  4. Tim Prince <> wrote:
    >on forums specific to your chosen compiler, should you think it worth
    >the hassle.


    Why is it that the people who are so finnicky about getting the
    "newsgroups:" line correct, are also the ones who never read the
    "newsgroups:" line?

    If the message is ALREADY being posted to the appropriate newsgroup,
    by all means tell the poster not to crosspost to yours, but don't tell
    them to post to the appropriate newsgroup.

    --
    Lucian
    Lucian Wischik, Dec 11, 2005
    #4
  5. In article <>,
    Lucian Wischik <> wrote:
    >Tim Prince <> wrote:
    >>on forums specific to your chosen compiler, should you think it worth
    >>the hassle.

    >
    >Why is it that the people who are so finnicky about getting the
    >"newsgroups:" line correct, are also the ones who never read the
    >"newsgroups:" line?
    >
    >If the message is ALREADY being posted to the appropriate newsgroup,
    >by all means tell the poster not to crosspost to yours, but don't tell
    >them to post to the appropriate newsgroup.


    That's just the way clc is. Get used to it.

    (I'm reading and posting this from clc, so it makes sense for me to be
    posting in this style. I grant that it looks stupid if you are reading
    this from some other newsgroup - but again, that's just the way clc is...)
    Kenny McCormack, Dec 11, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    512
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    488
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  3. djskrill
    Replies:
    9
    Views:
    698
    djskrill
    Oct 1, 2003
  4. Peng Yu
    Replies:
    17
    Views:
    688
    Peng Yu
    Sep 14, 2008
  5. Jack Steven
    Replies:
    2
    Views:
    433
    Chris Rebert
    Mar 9, 2009
Loading...

Share This Page