Revision: 44585
http://brlcad.svn.sourceforge.net/brlcad/?rev=44585&view=rev
Author: erikgreenwald
Date: 2011-05-09 19:12:25 +0000 (Mon, 09 May 2011)
Log Message:
-----------
use bu_gettime() instead of gettimeofday
Modified Paths:
--------------
brlcad/trunk/src/adrt/isst.h
brlcad/trunk/src/adrt/isst_tcltk.c
Modified: brlcad/trunk/src/adrt/isst.h
===================================================================
--- brlcad/trunk/src/adrt/isst.h 2011-05-09 19:08:54 UTC (rev 44584)
+++ brlcad/trunk/src/adrt/isst.h 2011-05-09 19:12:25 UTC (rev 44585)
@@ -36,8 +36,8 @@
void *texdata;
vect_t camera_pos_init;
vect_t camera_focus_init;
- struct timeval t1;
- struct timeval t2;
+ int64_t t1;
+ int64_t t2;
int dirty;
};
Modified: brlcad/trunk/src/adrt/isst_tcltk.c
===================================================================
--- brlcad/trunk/src/adrt/isst_tcltk.c 2011-05-09 19:08:54 UTC (rev 44584)
+++ brlcad/trunk/src/adrt/isst_tcltk.c 2011-05-09 19:12:25 UTC (rev 44585)
@@ -31,6 +31,8 @@
#include "togl.h"
+#include "bu.h"
+
#include "tie.h"
#include "adrt.h"
#include "adrt_struct.h"
@@ -42,11 +44,6 @@
# include <unistd.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
-
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -172,8 +169,8 @@
resize_isst(isst);
- gettimeofday(&(isst->t1), NULL);
- gettimeofday(&(isst->t2), NULL);
+ isst->t1 = bu_gettime();
+ isst->t2 = bu_gettime();
return TCL_OK;
}
@@ -229,17 +226,17 @@
isst = (struct isst_s *) Togl_GetClientData(togl);
- gettimeofday(&(isst->t2), NULL);
+ isst->t2 = bu_gettime();
- dt = (((double)isst->t2.tv_sec+(double)isst->t2.tv_usec/(double)1e6) -
((double)isst->t1.tv_sec+(double)isst->t1.tv_usec/(double)1e6));
+ dt = isst->t2 - isst->t1;
- if (dt > 0.08 && isst->dirty) {
+ if (dt > 1e6*0.08 && isst->dirty) {
isst->buffer_image.ind = 0;
render_camera_prep(&isst->camera);
render_camera_render(&isst->camera, isst->tie, &isst->tile,
&isst->buffer_image);
- gettimeofday(&(isst->t1), NULL);
+ isst->t1 = bu_gettime();
glClear(glclrbts);
glLoadIdentity();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits