summaryrefslogtreecommitdiff
path: root/src/input/input_pvr.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-10-29 23:11:37 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-10-29 23:11:37 +0000
commit9320048966af54c31a0cc84f956460167c9bf882 (patch)
treed4f5be6027681950b65704d96f2f081f33a038e8 /src/input/input_pvr.c
parentcaf3f7a6dc518a95522dd18a9940387909d81d98 (diff)
downloadxine-lib-9320048966af54c31a0cc84f956460167c9bf882.tar.gz
xine-lib-9320048966af54c31a0cc84f956460167c9bf882.tar.bz2
use monotonic clock when available
CVS patchset: 7087 CVS date: 2004/10/29 23:11:37
Diffstat (limited to 'src/input/input_pvr.c')
-rw-r--r--src/input/input_pvr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c
index 3eed852b6..2fe965378 100644
--- a/src/input/input_pvr.c
+++ b/src/input/input_pvr.c
@@ -38,7 +38,7 @@
* usage:
* xine pvr:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age>
*
- * $Id: input_pvr.c,v 1.50 2004/08/27 17:53:32 miguelfreitas Exp $
+ * $Id: input_pvr.c,v 1.51 2004/10/29 23:11:37 miguelfreitas Exp $
*/
/**************************************************************************
@@ -284,7 +284,7 @@ static void pvrscr_set_pivot (pvrscr_t *this) {
int64_t pts;
double pts_calc;
- gettimeofday(&tv, NULL);
+ xine_monotonic_clock(&tv, NULL);
pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor;
pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6;
pts = this->cur_pts + pts_calc;
@@ -331,7 +331,7 @@ static void pvrscr_adjust (scr_plugin_t *scr, int64_t vpts) {
pthread_mutex_lock (&this->lock);
- gettimeofday(&tv, NULL);
+ xine_monotonic_clock(&tv, NULL);
this->cur_time.tv_sec=tv.tv_sec;
this->cur_time.tv_usec=tv.tv_usec;
this->cur_pts = vpts;
@@ -344,7 +344,7 @@ static void pvrscr_start (scr_plugin_t *scr, int64_t start_vpts) {
pthread_mutex_lock (&this->lock);
- gettimeofday(&this->cur_time, NULL);
+ xine_monotonic_clock(&this->cur_time, NULL);
this->cur_pts = start_vpts;
pthread_mutex_unlock (&this->lock);
@@ -360,7 +360,7 @@ static int64_t pvrscr_get_current (scr_plugin_t *scr) {
double pts_calc;
pthread_mutex_lock (&this->lock);
- gettimeofday(&tv, NULL);
+ xine_monotonic_clock(&tv, NULL);
pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor;
pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6;