[vlc-devel] commit: Use CLOCK_FREQ ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Sep 3 19:41:41 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Sep 3 20:42:55 2008 +0300| [05882af7708bed7a14bda0ca525a42c9fba471dc] | committer: Rémi Denis-Courmont
Use CLOCK_FREQ
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05882af7708bed7a14bda0ca525a42c9fba471dc
---
include/vlc_threads.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index fa0fc7c..6970358 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -501,8 +501,8 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
mtime_t deadline )
{
#if defined(LIBVLC_USE_PTHREAD)
- lldiv_t d = lldiv( deadline, 1000000 );
- struct timespec ts = { d.quot, d.rem * 1000 };
+ lldiv_t d = lldiv( deadline, CLOCK_FREQ );
+ struct timespec ts = { d.quot, d.rem * (1000000000 / CLOCK_FREQ) };
int val = pthread_cond_timedwait (p_condvar, p_mutex, &ts);
if (val != ETIMEDOUT)
@@ -510,7 +510,7 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
return val;
#elif defined( UNDER_CE )
- mtime_t delay_ms = (deadline - mdate())/1000;
+ mtime_t delay_ms = (deadline - mdate()) / (CLOCK_FREQ / 1000);
DWORD result;
if( delay_ms < 0 )
delay_ms = 0;
More information about the vlc-devel
mailing list