<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- a/lpc21isp.c
+++ b/lpc21isp.c
@@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONM
 */
 void Sleep(unsigned long MilliSeconds)
 {
-    usleep(MilliSeconds*1000); //convert to microseconds
+    struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000};
+    nanosleep(&amp;m, &amp;m); //convert to nanoseconds
 }
 #endif // defined COMPILE_FOR_LINUX
 
</pre></body></html>