From: Rafaël Carré Date: Wed, 7 Oct 2009 01:50:50 +0000 (+0200) Subject: vlc_mtime.h : add timer limits for FreeBSD X-Git-Tag: 1.1.0-ff~2989 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5ee992272cab66ba0161c00ae5224cf1295fccfc;p=vlc vlc_mtime.h : add timer limits for FreeBSD Add some comments to explain the values --- diff --git a/include/vlc_mtime.h b/include/vlc_mtime.h index 49f53ca658..dc47314faf 100644 --- a/include/vlc_mtime.h +++ b/include/vlc_mtime.h @@ -68,9 +68,14 @@ VLC_EXPORT( void, mwait, ( mtime_t date ) ); VLC_EXPORT( void, msleep, ( mtime_t delay ) ); VLC_EXPORT( char *, secstotimestr, ( char *psz_buffer, int secs ) ); -#if defined (__GNUC__) && defined (__linux__) -# define VLC_HARD_MIN_SLEEP 10000 /* Linux has 100, 250, 300 or 1000Hz */ -# define VLC_SOFT_MIN_SLEEP 9000000 +#if (defined (__GNUC__) && defined (__linux__)) || defined (__FreeBSD__) +/* Linux has 100, 250, 300 or 1000Hz + * + * HZ=100 by default on FreeBSD, but some architectures use a 1000Hz timer + */ +# define VLC_HARD_MIN_SLEEP 10000 /* 10 milliseconds = 1 tick at 100Hz */ +# define VLC_SOFT_MIN_SLEEP 9000000 /* 9 seconds */ +#endif static __attribute__((unused))