Revision: 7257
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7257&view=rev
Author:   thjc
Date:     2009-01-08 18:38:04 +0000 (Thu, 08 Jan 2009)

Log Message:
-----------
Merge of 7256 from 201:
Applied patch 2161837 - PlayerV sleep to avoid 100% CPU

Modified Paths:
--------------
    code/player/trunk/utils/playerv/playerv.c

Property Changed:
----------------
    code/player/trunk/


Property changes on: code/player/trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/code/player/branches/release-2-1-patches:6672-6673,6738,6834,6886,6905,6930,6936,6946,6951,6955,6975,6979-6981,6985,6987-6996,7087-7088,7204,7226,7230,7248,7250-7252
/code/player/trunk:6985
   + 
/code/player/branches/release-2-1-patches:6672-6673,6738,6834,6886,6905,6930,6936,6946,6951,6955,6975,6979-6981,6985,6987-6996,7087-7088,7204,7226,7230,7248,7250-7252,7256
/code/player/trunk:6985

Modified: code/player/trunk/utils/playerv/playerv.c
===================================================================
--- code/player/trunk/utils/playerv/playerv.c   2009-01-08 18:19:00 UTC (rev 
7256)
+++ code/player/trunk/utils/playerv/playerv.c   2009-01-08 18:38:04 UTC (rev 
7257)
@@ -124,6 +124,8 @@
 #include <time.h>
 #include "playerv.h"
 
+#define GUI_UPDATE_RATE 20.0
+    /* 20 Hz update rate is good for user interaction */
 
 // Set flag to 1 to force program to quit
 static int quit = 0;
@@ -164,7 +166,7 @@
   device_t devices[PLAYER_MAX_DEVICES];
   device_t *device;
   struct timeval tv, tc = {0, 0};
-  struct timespec st = {0,0};
+  struct timespec st = {0, (1.0/GUI_UPDATE_RATE) * 1e9};
 
   printf("PlayerViewer %s\n", PLAYER_VERSION);
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to