apps/examples/tcpblaster: Fix an error in time calculation.

This commit is contained in:
Gregory Nutt 2018-07-06 14:44:26 -06:00
parent 19b8a52500
commit db77b1ec6c
2 changed files with 2 additions and 0 deletions

View File

@ -189,6 +189,7 @@ void tcpblaster_client(void)
else
{
unsigned long borrow = 1000000000 - start.tv_nsec;
elapsed.tv_sec--;
elapsed.tv_nsec = curr.tv_nsec + borrow;
}

View File

@ -218,6 +218,7 @@ void tcpblaster_server(void)
else
{
unsigned long borrow = 1000000000 - start.tv_nsec;
elapsed.tv_sec--;
elapsed.tv_nsec = curr.tv_nsec + borrow;
}