* Get number of ticks. * @todo Figure out what a 'tick' is. * @bug Unix version looks wrong, \c time.tv_usec should be divided to get * seconds or \c time.tc_sec should be multiplied. */
| 167 | * seconds or \c time.tc_sec should be multiplied. |
| 168 | */ |
| 169 | Quad Micropolis::tickCount() |
| 170 | { |
| 171 | #ifdef _WIN32 |
| 172 | return (::GetTickCount() * 60) / 1000; |
| 173 | #else |
| 174 | struct timeval time; |
| 175 | gettimeofday(&time, 0); |
| 176 | return (Quad)((time.tv_sec * 60) + (time.tv_usec * 60) / 1000000); |
| 177 | #endif |
| 178 | } |
| 179 | |
| 180 | |
| 181 | /** |
no outgoing calls
no test coverage detected