Link to home
Start Free TrialLog in
Avatar of albusaidi
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
Avatar of avizit
avizit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of albusaidi
albusaidi

ASKER

did You try it before .. I mean even all function used in linex like gettimeof day will be in windows after I dowload this tools.
Thank You
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.