\helpref{wxMakeMetafilePlaceable}{wxmakemetafileplaceable}\\
\helpref{wxMatchWild}{wxmatchwild}\\
\helpref{wxMessageBox}{wxmessagebox}\\
+\helpref{wxMilliSleep}{wxmillisleep}\\
+\helpref{wxMicroSleep}{wxmicrosleep}\\
\helpref{wxMkdir}{wxmkdir}\\
\helpref{wxMutexGuiEnter}{wxmutexguienter}\\
\helpref{wxMutexGuiLeave}{wxmutexguileave}\\
<wx/timer.h>
+\membersection{::wxMicroSleep}\label{wxmicrosleep}
+
+\func{void}{wxMicroSleep}{\param{unsigned long}{ microseconds}}
+
+Sleeps for the specified number of microseconds. The microsecond resolution may
+not, in fact, be available on all platforms (currently only Unix platforms with
+nanosleep(2) may provide it) in which case this is the same as
+\helpref{wxMilliSleep}{wxmillisleep}(\arg{microseconds}$/1000$).
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
+\membersection{::wxMilliSleep}\label{wxmillisleep}
+
+\func{void}{wxMilliSleep}{\param{unsigned long}{ milliseconds}}
+
+Sleeps for the specified number of milliseconds. Notice that usage of this
+function is encouraged instead of calling usleep(3) directly because the
+standard usleep() function is not MT safe.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
\membersection{::wxNow}\label{wxnow}
\func{wxString}{wxNow}{\void}
\func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}}
-Sleeps for the specified number of milliseconds. Notice that usage of this
-function is encouraged instead of calling usleep(3) directly because the
-standard usleep() function is not MT safe.
-
-\wxheading{Include files}
-
-<wx/utils.h>
+This function is deprecated because its name is misleading: notice that the
+argument is in milliseconds, not microseconds. Please use either
+\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep}
+depending on the resolution you need.
WXDLLIMPEXP_BASE void wxSleep(int nSecs);
// Sleep for a given amount of milliseconds
-WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds);
+WXDLLIMPEXP_BASE void wxMilliSleep(unsigned long milliseconds);
+
+// Sleep for a given amount of microseconds
+WXDLLIMPEXP_BASE void wxMicroSleep(unsigned long microseconds);
+
+// Sleep for a given amount of milliseconds (old, bad name), use wxMilliSleep
+wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) );
// Get the process id of the current process
WXDLLIMPEXP_BASE unsigned long wxGetProcessId();
// sleep functions
// ----------------------------------------------------------------------------
-void wxUsleep(unsigned long milliseconds)
+void wxMilliSleep(unsigned long milliseconds)
{
::Sleep(milliseconds);
}
+void wxMicroSleep(unsigned long microseconds)
+{
+ wxMilliSleep(microseconds/1000);
+}
+
void wxSleep(int nSecs)
{
- wxUsleep(1000*nSecs);
+ wxMilliSleep(1000*nSecs);
}
// ----------------------------------------------------------------------------