diff --git a/src/main.c b/src/main.c index c972b0c..028de5a 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,8 @@ #include #include +#include +#include #include #include "config.h" @@ -8,10 +10,16 @@ #include "gui.h" #include "display.h" +static long long time_in_useconds( void ) +{ + struct timespec ts; + timespec_get( &ts, TIME_UTC ); + return ( long long )ts.tv_sec * 1000000000 + ts.tv_nsec; +} + long long time_in_mseconds( void ) { struct timeval tv; - gettimeofday( &tv, NULL ); return ( ( ( long long )tv.tv_sec ) * 1000 ) + ( tv.tv_usec / 1000 ); } @@ -20,7 +28,7 @@ long long currentTime; // gui_update long long lastTime_gui_update = 0; -long long delay_gui_update = 16; +long long delay_gui_update = 16; // 15625; int main( int argc, char* argv[] ) {