aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/gamedb.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index 058ed95..9758271 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -308,22 +308,26 @@ PUBLIC void send_boards(int g)
}
}
-PUBLIC void game_update_time(int g)
+PUBLIC void
+game_update_time(int g)
{
- unsigned now, timesince;
-
- if (garray[g].clockStopped)
- return;
- if (garray[g].type == TYPE_UNTIMED)
- return;
- now = tenth_secs();
- timesince = now - garray[g].lastDecTime;
- if (garray[g].game_state.onMove == WHITE) {
- garray[g].wTime -= timesince;
- } else {
- garray[g].bTime -= timesince;
- }
- garray[g].lastDecTime = now;
+ unsigned int now, timesince;
+
+ if (garray[g].clockStopped)
+ return;
+ if (garray[g].type == TYPE_UNTIMED)
+ return;
+
+ now = tenth_secs();
+ timesince = now - garray[g].lastDecTime;
+
+ if (garray[g].game_state.onMove == WHITE) {
+ garray[g].wTime -= timesince;
+ } else {
+ garray[g].bTime -= timesince;
+ }
+
+ garray[g].lastDecTime = now;
}
PUBLIC void