From 5ee992272cab66ba0161c00ae5224cf1295fccfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 7 Oct 2009 03:50:50 +0200 Subject: [PATCH] vlc_mtime.h : add timer limits for FreeBSD Add some comments to explain the values --- include/vlc_mtime.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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)) -- 2.39.5