#22 Need gettimeofday (no ftime available on some platforms)

open
nobody
5
2012-07-18
2007-07-22
Daniel Macks
No

Trying to compile glui-2.35 on OS X 10.3:

g++ -I./ -I./include -I/usr/X11R6/include -c glui_list.cpp
glui_list.cpp: In member function virtual int GLUI_List::mouse_down_handler(int, int)': glui_list.cpp:92: error:ftime' undeclared (first use this function)
glui_list.cpp:92: error: (Each undeclared identifier is reported only once for
each function it appears in.)
make: *** [glui_list.o] Error 1

and sys/timeb.h has a note:

/ The ftime(2) system call structure -- deprecated. /

so not sure how (or even if) I can access that function or struct. The alternative way to get time is the gettimeofday() function, which appears to be the same pieces of data as ftime() but in different structs.

Discussion

  • Daniel Macks
    Daniel Macks
    2007-07-22

    Use gettimeofday instead of ftime

     
    Attachments
  • Daniel Macks
    Daniel Macks
    2007-07-22

    Logged In: YES
    user_id=535292
    Originator: YES

    File Added: gettimeofday1.patch

     


Anonymous


Cancel   Add attachments