]> skyeroc.xyz Git - dgamelaunch/commitdiff
Minor optimization in watching menu.
authorPasi Kallinen <paxed@alt.org>
Fri, 7 May 2010 20:01:40 +0000 (20:01 +0000)
committerPasi Kallinen <paxed@alt.org>
Fri, 7 May 2010 20:01:40 +0000 (20:01 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@558 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Changelog
dgamelaunch.c

index 1f7ced5627018dd2387c9fcd88e870a39fa24ed8..5359e4fe54b07f647946d0010ee89abee6e4533f 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,6 @@
+1.5.2 (2010/xx/xx)
+       * Output some identifying information into the ttyrecs.
+
 1.5.1 (2010/05/02)
        * Allow sorting the watching-menu by any column.
        * Show number of people watching each game.
index e8ab8cf147a31f0e08e187015a9607ca941e48fb..cc5b76426bcf856a7b1cca586a2bf8da541d42ab 100644 (file)
@@ -636,6 +636,8 @@ inprogressmenu (int gameid)
 
   int di;
 
+  time_t ctime;
+
   struct dg_watchcols {
       int dat;
       int sortmode;
@@ -706,6 +708,8 @@ inprogressmenu (int gameid)
 
       shm_sem_wait(shm_dg_data);
 
+      (void) time(&ctime);
+
       for (i = 0; i < max_height; i++)
         {
           if (i + offset >= len)
@@ -722,10 +726,8 @@ inprogressmenu (int gameid)
                games[i + offset]->ws_col, games[i + offset]->ws_row);
 
          {
-             time_t ctime;
              long secs, mins, hours;
 
-             (void) time(&ctime);
              secs = (ctime - games[i + offset]->idle_time);
              hours = (secs / 3600);
              secs -= (hours * 3600);