diff --git a/communication.c b/communication.c index 4ec4ec5..73e4579 100644 --- a/communication.c +++ b/communication.c @@ -43,10 +43,13 @@ void augmente_index(unsigned int *index, unsigned int offset){ void communication_reception_message(){ int input_char; int chaîne_octets_reçus[TAMPON_TAILLE]; + absolute_time_t current_time_us, start_time_us; unsigned int index_chaine_recue; unsigned int index_tampon; struct message_t message; // Si un caractère est reçu, ajout du caractère au tampon tournant + + start_time_us = get_absolute_time(); input_char = stdio_getchar_timeout_us(0); while(input_char != PICO_ERROR_TIMEOUT){ com_reception_buffer.index_tampon_ecriture++; @@ -58,6 +61,8 @@ void communication_reception_message(){ // Caractère suivant ? input_char = stdio_getchar_timeout_us(0); } + current_time_us = get_absolute_time(); + printf(">temps:%lld\n", current_time_us - start_time_us); // Copie du tampon tournant dans une chaine // Parce que c'est plus simple à traiter