diff --git a/src/main.c b/src/main.c index 4fd5aba..a9cba37 100644 --- a/src/main.c +++ b/src/main.c @@ -19,6 +19,9 @@ void handle_sigint(int sig) { int main() { signal(SIGINT, handle_sigint); + struct timeval start_time; + gettimeofday(&start_time, NULL); + const char* device = "/dev/spidev1.0"; const uint8_t spi_mode = SPI_MODE_0; const uint8_t spi_bits = 8; @@ -34,9 +37,6 @@ int main() { uint8_t* buffer = malloc(data_size); Color* colors = malloc(sizeof(Color) * num_leds); - struct timeval start_time; - gettimeofday(&start_time, NULL); - while (!stop) { struct timeval current_time; gettimeofday(¤t_time, NULL);