summaryrefslogtreecommitdiff
path: root/devel/glui/files/patch-glui_list.cpp
blob: f7aca8651352ac03fbbc88ba7bf50e42bb2f3761 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- glui_list.cpp.orig	2007-11-04 08:19:40.000000000 +0300
+++ glui_list.cpp	2010-02-08 19:59:12.000000000 +0300
@@ -30,7 +30,7 @@
 
 #include "glui_internal_control.h"
 #include <cmath>
-#include <sys/timeb.h>
+#include <sys/time.h>
 
 /****************************** GLUI_List::GLUI_List() **********/
 
@@ -100,9 +100,9 @@
 {
   int tmp_line;
   unsigned long int ms;
-  timeb time;
-  ftime(&time);
-  ms = time.millitm + (time.time)*1000;
+  struct timeval tv;
+  gettimeofday(&tv, NULL);
+  ms = tv.tv_usec/100 + (tv.tv_sec)*1000;
 
   tmp_line = find_line( local_x-x_abs, local_y-y_abs-5 );  
   if ( tmp_line == -1 ) {