Game Development
October 4, 2020
Actually, the difference is a factor of one thousand. Usleep (c++) takes a value in microseconds (millionths), whilst setInterval (ECMAScript) takes a value in milliseconds (thousandths). This is why Xlib applications go way to fast if you don't multiply by one thousand. Because C++ is incredibly fast, recommended interval in Xlib is 20,000. Javascript being much slower, divide by 2000 rather than 1000 to get 10.
Username (always anonymous!):
Content: