1. The SLEEP function in the MFC is different from the SLEEP function under Linux.

xiaoxiao2021-03-06  16

A> The SLEEP function in the MFC is:

Void Sleep

DWORD dwmilliseconds

);

B> The SLEEP function in Linux is:

Unsigned int SLEP (unsigned int seconds);

In milliseconds in the MFC, Linux is second. The thread sleep function with microseconds under Linux is:

Void USEP (unsigned long); int usleep (unsigned long); / * susv2 * /

Or use the SELECT function TimeVal structure or (most accurate to microseconds),

Or use a Pselect function timeespec (can be accurate to nanoseconds, it is accurate enough!)

Spacraft

2005-03-19

转载请注明原文地址:https://www.9cbs.com/read-45573.html

New Post(0)