diff --git a/drivers/rptun/rptun_ping.c b/drivers/rptun/rptun_ping.c index 60055cef37..76ab8c59c0 100644 --- a/drivers/rptun/rptun_ping.c +++ b/drivers/rptun/rptun_ping.c @@ -161,6 +161,8 @@ int rptun_ping(FAR struct rpmsg_endpoint *ept, min = MIN(min, tm); max = MAX(max, tm); total += tm; + + usleep(ping->sleep * USEC_PER_MSEC); } syslog(LOG_INFO, "current CPU freq: %" PRIu32 ", ping times: %d\n", diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h index 2405ebe023..6d17377909 100644 --- a/include/nuttx/rptun/rptun.h +++ b/include/nuttx/rptun/rptun.h @@ -349,6 +349,7 @@ struct rptun_ping_s int times; int len; bool ack; + int sleep; /* unit: ms */ }; /****************************************************************************