albusaidi
asked on
gettimeofday in linux to windows platform
Hi... I completed by project in Linux platform and now I what to convert it to windows platform
but wjen I start compiling in C++ compiler( both borland and visual c++ ) the compiler can't recognized gettimeofday which return type (timeval ) which can be second or milsecond???
so what can I do ???
If I plan to change the source code will impact many class....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The portable solution would be to use the functions in time.h. Cygwin should work if you just want to move a simple UNIX program to Windows, since it works with a lot of complex utilities that need to know the time of day. Once you get Cygwin working it should feel familiar to a linux user.
I posted a more complete recommendation so I should get more points :) Requiring a Windows user to install Cygwin in order to use your software is a pretty bad answer, so I recommended using time.h which is standard.
ASKER
Thank You