Skip to content

Commit

Permalink
Fix for pigpio delayMicroseconds (#954)
Browse files Browse the repository at this point in the history
- per @2bndy5 in #950
  • Loading branch information
TMRh20 authored Mar 3, 2024
1 parent 762705c commit c7de106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utility/pigpio/compatibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void __usleep(int microsec)
{
struct timespec req; // = {0};
req.tv_sec = (time_t)microsec / 1000000;
req.tv_nsec = (microsec / 1000000) * 1000;
req.tv_nsec = (microsec % 1000000) * 1000;
//nanosleep(&req, (struct timespec *)NULL);
clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL);
}
Expand Down

0 comments on commit c7de106

Please sign in to comment.