summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven J. Hill <sjhill@realitydiluted.com>2013-03-03 15:13:10 -0600
committerWladimir J. van der Laan <laanwj@gmail.com>2013-03-04 04:43:56 +0100
commit830d108382ed40d17749034ccdeeff17e7c931b3 (patch)
tree7fdcad91e6d33e6194b80185d8caf61c33d268a8
parent75e02a6498c75e3b1144668762925128f52a77f7 (diff)
native: lib: Remove obsolete 'struct timezone' usage.
The use of the 'struct timezone' data type is prohibited. It is legacy and should not be used. Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
-rw-r--r--native/lib/esUtil.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/native/lib/esUtil.c b/native/lib/esUtil.c
index 2b215bf..c163790 100644
--- a/native/lib/esUtil.c
+++ b/native/lib/esUtil.c
@@ -289,16 +289,15 @@ GLboolean ESUTIL_API esCreateWindow ( ESContext *esContext, const char* title, G
void ESUTIL_API esMainLoop ( ESContext *esContext )
{
struct timeval t1, t2;
- struct timezone tz;
float deltatime;
float totaltime = 0.0f;
unsigned int frames = 0;
- gettimeofday ( &t1 , &tz );
+ gettimeofday (&t1 , NULL);
while(userInterrupt(esContext) == GL_FALSE && !esContext->terminate)
{
- gettimeofday(&t2, &tz);
+ gettimeofday(&t2, NULL);
deltatime = (float)(t2.tv_sec - t1.tv_sec + (t2.tv_usec - t1.tv_usec) * 1e-6);
t1 = t2;
@@ -425,8 +424,7 @@ double esNow(void)
#ifdef __VMS
(void) gettimeofday(&tv, NULL );
#else
- struct timezone tz;
- (void) gettimeofday(&tv, &tz);
+ (void) gettimeofday(&tv, NULL);
#endif
return tv.tv_sec * 1.0 + tv.tv_usec / 1000000.0;
}