MCPcopy Create free account
hub / github.com/SimHacker/micropolis / tickCount

Method tickCount

MicropolisCore/src/MicropolisEngine/src/stubs.cpp:169–178  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

167 * seconds or \c time.tc_sec should be multiplied.
168 */
169Quad 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/**

Callers 4

simulateMethod · 0.80
simulateMethod · 0.80
beforeDrawMethod · 0.80
beforeDrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected