Let's use double instead of integer to the ticks.
This commit is contained in:
parent
ac3779e640
commit
5ba3560378
@ -397,14 +397,14 @@ static void read_keys()
|
|||||||
}
|
}
|
||||||
#endif /* PRETENT_DISPLAY */
|
#endif /* PRETENT_DISPLAY */
|
||||||
|
|
||||||
uint64_t getTicks()
|
double getTicks()
|
||||||
{
|
{
|
||||||
struct timeval curTime;
|
struct timeval curTime;
|
||||||
uint64_t ticks;
|
double ticks;
|
||||||
/* Get datetime */
|
/* Get datetime */
|
||||||
gettimeofday(&curTime, NULL);
|
gettimeofday(&curTime, NULL);
|
||||||
|
|
||||||
ticks = (curTime.tv_sec * 1000) + curTime.tv_usec / 1000;
|
ticks = (curTime.tv_sec * 1000.) + curTime.tv_usec / 1000.;
|
||||||
|
|
||||||
return ticks;
|
return ticks;
|
||||||
}
|
}
|
||||||
@ -436,7 +436,7 @@ void ws_emulate(void)
|
|||||||
int16_t *backBuffer = (int16_t *)mainWindow.videoMemory;
|
int16_t *backBuffer = (int16_t *)mainWindow.videoMemory;
|
||||||
|
|
||||||
|
|
||||||
dNormalLast = (double)getTicks();
|
dNormalLast = getTicks();
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user