From 6e8c96e7cfc89393d9a82c6b9743ea3584508002 Mon Sep 17 00:00:00 2001 From: Samuel Date: Mon, 22 Sep 2025 21:01:13 +0200 Subject: [PATCH] =?UTF-8?q?Reception=20test=C3=A9e=203h30,=20debut=20des?= =?UTF-8?q?=20mesures=20de=20performances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- communication.c | 5 +++++ 1 file changed, 5 insertions(+) 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