Linux program use times() to Windows

D

Davy

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
 
T

Tim Prince

Davy said:
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.
 
M

Marc Dansereau

Davy said:
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
 
L

Lucian Wischik

Tim Prince said:
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.
 
K

Kenny McCormack

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...)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top