serial : timeout in prgress

This commit is contained in:
2018-12-12 22:26:54 +01:00
parent cda7b7f45e
commit c1652b68e2
2 changed files with 32 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
#include <stdio.h>
#include <time.h>
#include "serial.h"
@@ -18,9 +19,10 @@ for (foo=0; foo<20; foo++) {
if (byte < 0) {
fprintf(stderr, "get byte : err is %d\n", byte);
}
else {
printf("%6d %6d %02x\n", foo, to, byte);
}
// XXX else {
printf("%9ld %6d %6d %02x\n",
time(NULL), foo, to, byte);
// XXX }
}
return 0;