aboutsummaryrefslogtreecommitdiffstats
path: root/progs/demos/tunnel.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-09-12 18:44:45 +0000
committerBrian Paul <[email protected]>2000-09-12 18:44:45 +0000
commitd49b34a233628a476b87dd2e2609405d76ac8866 (patch)
tree6d3d34783a333150862160cee8ccfd29629e14da /progs/demos/tunnel.c
parentb8cc1508362ccad0182d838faa3c4079632cd7fb (diff)
better FPS calculation
Diffstat (limited to 'progs/demos/tunnel.c')
-rw-r--r--progs/demos/tunnel.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/progs/demos/tunnel.c b/progs/demos/tunnel.c
index 10d9a540b7e..712edc5d7bd 100644
--- a/progs/demos/tunnel.c
+++ b/progs/demos/tunnel.c
@@ -155,21 +155,6 @@ drawobjs(int *l, float *f)
}
}
-static float
-gettime(void)
-{
- static clock_t told = 0;
- clock_t tnew, ris;
-
- tnew = clock();
-
- ris = tnew - told;
-
- told = tnew;
-
- return (ris / (float) CLOCKS_PER_SEC);
-}
-
static void
calcposobs(void)
{
@@ -369,7 +354,7 @@ draw(void)
{
static char frbuf[80] = "";
int i;
- float fr, base, offset;
+ float base, offset;
dojoy();
@@ -445,7 +430,6 @@ draw(void)
glutSwapBuffers();
Frames++;
-
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {