* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#if !defined( __LIBVLC__ )
- #error You are not libvlc or one of its plugins. You cannot include this file
-#endif
+#ifndef __VLC_MTIME_H
+# define __VLC_MTIME_H 1
/*****************************************************************************
* LAST_MDATE: date which will never happen
VLC_EXPORT( void, msleep, ( mtime_t delay ) );
VLC_EXPORT( char *, secstotimestr, ( char *psz_buffer, int secs ) );
+#ifdef __GNUC__
+static
+__attribute__((unused))
+__attribute__((noinline))
+__attribute__((warning("use proper event handling instead")))
+void bad_msleep( mtime_t delay )
+{
+ msleep( delay );
+}
+# define msleep( d ) \
+ ((__builtin_constant_p(d) && (d < 29000000)) ? bad_msleep(d) : msleep(d))
+#endif
+
/*****************************************************************************
* date_t: date incrementation without long-term rounding errors
*****************************************************************************/
VLC_EXPORT( void, date_Move, ( date_t *, mtime_t ) );
VLC_EXPORT( mtime_t, date_Increment, ( date_t *, uint32_t ) );
VLC_EXPORT( uint64_t, NTPtime64, ( void ) );
+#endif /* !__VLC_MTIME_ */