Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-rogers committed Sep 30, 2024
1 parent 99d0115 commit 1c0d432
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ bool jsd_init(jsd_t* self, const char* ifname, uint8_t enable_autorecovery, int
struct timespec diff;
diff.tv_sec = current_time.tv_sec - start_processdata_time.tv_sec;
diff.tv_nsec = current_time.tv_nsec - start_processdata_time.tv_nsec;

// Sleep for period defined by timeout_us before attempting to do a receive_processdata.
// LRW packets must be sent at constant interval to encourage a successful transition to OP state/
if (nanosleep(&diff, NULL) < 0) {
perror("nanosleep failed");
return 1;
Expand Down

0 comments on commit 1c0d432

Please sign in to comment.