diff --git a/src/libtomahawk/utils/TomahawkUtils.cpp b/src/libtomahawk/utils/TomahawkUtils.cpp index ddb19dd78..67529673e 100644 --- a/src/libtomahawk/utils/TomahawkUtils.cpp +++ b/src/libtomahawk/utils/TomahawkUtils.cpp @@ -316,6 +316,18 @@ extensionToMimetype( const QString& extension ) return s_ext2mime.value( extension, "unknown" ); } + +void +msleep( unsigned int ms ) +{ + #ifdef WIN32 + Sleep( ms ); + #else + ::usleep( ms * 1000 ); + #endif +} + + static QMutex s_noProxyHostsMutex; static QStringList s_noProxyHosts; diff --git a/src/libtomahawk/utils/TomahawkUtils.h b/src/libtomahawk/utils/TomahawkUtils.h index c3b256ca2..e1b0c3e98 100644 --- a/src/libtomahawk/utils/TomahawkUtils.h +++ b/src/libtomahawk/utils/TomahawkUtils.h @@ -99,6 +99,8 @@ namespace TomahawkUtils DLLEXPORT QString ageToString( const QDateTime& time, bool appendAgoString = false ); DLLEXPORT QString filesizeToString( unsigned int size ); DLLEXPORT QString extensionToMimetype( const QString& extension ); + + DLLEXPORT void msleep( unsigned int ms ); DLLEXPORT bool newerVersion( const QString& oldVersion, const QString& newVersion ); DLLEXPORT NetworkProxyFactory* proxyFactory( bool makeClone = false, bool noMutexLocker = false );