This commit is contained in:
Gwenhael Le Moine 2024-09-25 10:19:44 +02:00
parent 8178571974
commit b92177ccee
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -8,7 +8,7 @@
#include "ui48_emulator.h" #include "ui48_emulator.h"
#include "ui48_common.h" #include "ui48_common.h"
#define SPEED_HZ_UI 64 #define UI_REFRESH_RATE_Hz 64
void signal_handler( int sig ) void signal_handler( int sig )
{ {
@ -59,9 +59,9 @@ int main( int argc, char** argv )
*/ */
struct itimerval it; struct itimerval it;
it.it_interval.tv_sec = 0; it.it_interval.tv_sec = 0;
it.it_interval.tv_usec = 1000000 / SPEED_HZ_UI; it.it_interval.tv_usec = 1000000 / UI_REFRESH_RATE_Hz;
it.it_value.tv_sec = 0; it.it_value.tv_sec = it.it_interval.tv_sec;
it.it_value.tv_usec = 1000000 / SPEED_HZ_UI; it.it_value.tv_usec = it.it_interval.tv_usec;
setitimer( ITIMER_REAL, &it, ( struct itimerval* )0 ); setitimer( ITIMER_REAL, &it, ( struct itimerval* )0 );
while ( true ) { while ( true ) {