You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
381 B

  1. --- a/lpc21isp.c
  2. +++ b/lpc21isp.c
  3. @@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONM
  4. */
  5. void Sleep(unsigned long MilliSeconds)
  6. {
  7. - usleep(MilliSeconds*1000); //convert to microseconds
  8. + struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000};
  9. + nanosleep(&m, &m); //convert to nanoseconds
  10. }
  11. #endif // defined COMPILE_FOR_LINUX