Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
jbendes committed Mar 1, 2024
1 parent e627958 commit 67a72b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/c/pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ int main(int argc, char *argv[])
my_data.name = EXAMPLE_T_test_const_string;
my_data.enabled = 1;

uint64_t sleepUs = 1000000/HZ;
while (1) {
if (example_t_publish(zcm, "EXAMPLE", &my_data) == 0)
++my_data.timestamp;
usleep(1000000/HZ);
if (sleepUs > 0) usleep(sleepUs);
}

zcm_destroy(zcm);
Expand Down

0 comments on commit 67a72b8

Please sign in to comment.