diff options
Diffstat (limited to 'src/sleep.h')
-rw-r--r-- | src/sleep.h | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/src/sleep.h b/src/sleep.h index 107b7a8..38b3618 100644 --- a/src/sleep.h +++ b/src/sleep.h @@ -24,34 +24,44 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_SLEEP_H__ -#define __DRUMGIZMO_SLEEP_H__ +#pragma once #include <QThread> -class __Sleeper : public QThread { +class __Sleeper + : public QThread +{ public: - void msleep(unsigned long msecs) { QThread::msleep(msecs); } - void sleep(unsigned long secs) { QThread::sleep(secs); } - void usleep(unsigned long usecs) { QThread::usleep(usecs); } + void msleep(unsigned long msecs) + { + QThread::msleep(msecs); + } + + void sleep(unsigned long secs) + { + QThread::sleep(secs); + } + + void usleep(unsigned long usecs) + { + QThread::usleep(usecs); + } }; inline void q_msleep(unsigned long msecs) { - __Sleeper s; - s.msleep(msecs); + __Sleeper s; + s.msleep(msecs); } inline void q_sleep(unsigned long secs) { - __Sleeper s; - s.sleep(secs); + __Sleeper s; + s.sleep(secs); } inline void q_usleep(unsigned long usecs) { - __Sleeper s; - s.usleep(usecs); + __Sleeper s; + s.usleep(usecs); } - -#endif/*__DRUMGIZMO_SLEEP_H__*/ |