Minor optimization in watching menu.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@558 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
3f3e9c3277
commit
f53dfb5c7b
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue