From 642a85360b3846b9e84c8a0e9671e23686313daf Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 16 Mar 2008 16:32:38 +0000 Subject: - obrazok co som zabudol odolslat - rozrobene zdrojaky git-svn-id: http://opensvn.csie.org/tuxanci_ng@20 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/myTimer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/myTimer.c') diff --git a/src/myTimer.c b/src/myTimer.c index 04abef0..ea83fd5 100644 --- a/src/myTimer.c +++ b/src/myTimer.c @@ -30,15 +30,13 @@ void initTimer() my_time_t getMyTime() { - static struct timeval start; + static struct timeval start = { .tv_sec = 0, .tv_usec = 0 }; struct timeval now; - static char first = '0'; my_time_t ticks; - if( first == '0' ) + if( start.tv_sec == 0 && start.tv_usec == 0 ) { gettimeofday(&start, NULL); - first = 'x'; } gettimeofday(&now, NULL); -- cgit v1.2.3