comparison TOOLS/fastmemcpybench.c @ 35904:cef5275fc11f

Avoid usage of obsolete and BSD-specific "struct timezone".
author diego
date Sun, 17 Mar 2013 22:47:31 +0000
parents b573c7c7173b
children fc2fd624ecc0
comparison
equal deleted inserted replaced
35903:389d43c448b3 35904:cef5275fc11f
173 173
174 // Returns current time in microseconds 174 // Returns current time in microseconds
175 static unsigned int GetTimer(void) 175 static unsigned int GetTimer(void)
176 { 176 {
177 struct timeval tv; 177 struct timeval tv;
178 struct timezone tz;
179 //float s; 178 //float s;
180 gettimeofday(&tv, &tz); 179 gettimeofday(&tv, NULL);
181 //s = tv.tv_usec; s *= 0.000001; s += tv.tv_sec; 180 //s = tv.tv_usec; s *= 0.000001; s += tv.tv_sec;
182 return tv.tv_sec * 1000000 + tv.tv_usec; 181 return tv.tv_sec * 1000000 + tv.tv_usec;
183 } 182 }
184 183
185 static inline unsigned long long int read_tsc(void) 184 static inline unsigned long long int read_tsc(void)