I need to get the system time from a Windows machine in a certain format, namely the GMT_UNIX_time format which is the number of seconds elapsed from the midnight starting Jan 1st 1970. Does anyone know how to do that?
I need to get the system time from a Windows machine in a certain format, namely the GMT_UNIX_time format which is the number of seconds elapsed from the midnight starting Jan 1st 1970. Does anyone know how to do that?
I don't understand your reply, none of the first 10 links on that google search relate to a time function.
He wants you to use the UNIX man pages. Try searching for "unix man time" instead.
But, I need this to work under Windows, so how would a UNIX shell command help me?
man pages are help files.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Right, I know what a man page is, I've used linux/unix/bsd before. What I need is a C++ function of some sort to get a time structure in Windows, so a unix man page doesn't help me.
Look... we could go on this forever, but obviously you are not making one ounce of an effort.
google "man unix time". You will get a list of links that will help you with the time function.
Then, when you actually click the links on google you will know why people are sending you there. It's an help file!
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Unless there is something wrong with the structure that the time.h functions return, I really don't see your point. I'm confident that the man page will help you understand if you would just read it.
time.h is standard so it is cross-platform. It's irrelevant what documentation you read as long as it is from a reliable source.
Then look up the time function in your compiler's documentation. Can you be more thick?Originally Posted by maxhavoc
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
He's being sent to the time command, citizen. Which is fine. However, obviously it didn't even cross his mind to just perhaps type on google "man page time c++" or "c++ time help" or "how to use time c++" or... "duh!"
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.