diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-16 16:32:38 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-16 16:32:38 +0000 |
| commit | 642a85360b3846b9e84c8a0e9671e23686313daf (patch) | |
| tree | 9da07aa0d3407ff70d1bb59bee2c3fa8b45209d0 /src/myTimer.c | |
| parent | 2c160370499826609371fa9621b8c31aa8a8566a (diff) | |
- obrazok co som zabudol odolslat
- rozrobene zdrojaky
git-svn-id: http://opensvn.csie.org/tuxanci_ng@20 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/myTimer.c')
| -rw-r--r-- | src/myTimer.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |