mirror of
https://github.com/apache/nuttx.git
synced 2026-10-22 06:09:46 +00:00
rptun_ping: add sleep param to rptun_ping
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
f9bcf1d645
commit
a014a19f0e
2 changed files with 3 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ struct rptun_ping_s
|
|||
int times;
|
||||
int len;
|
||||
bool ack;
|
||||
int sleep; /* unit: ms */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue