From 003b56f6a0579f55703b1f2e0563ad5162ce7e7b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 25 Nov 2013 12:10:43 +0100 Subject: [PATCH] Change variable name elapsed_seconds to elapsed_ticks This new name makes more sense, as later commits will introduce config.h variables that can change tick length. --- wmud/game.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wmud/game.c b/wmud/game.c index 0cb8f2b..0596724 100644 --- a/wmud/game.c +++ b/wmud/game.c @@ -39,12 +39,12 @@ */ /** - * elapsed_seconds: + * elapsed_ticks: * * the number of seconds elapsed since game boot. May be inaccurate, as it * simply gets updated by a timeout function which should run every second */ -guint32 elapsed_seconds = 0; +guint32 elapsed_ticks = 0; /** * elapsed_cycle: @@ -65,13 +65,13 @@ guint32 elapsed_cycle = 0; gboolean rl_sec_elapsed(gpointer user_data) { - elapsed_seconds++; - if (elapsed_seconds == G_MAXUINT32) { - elapsed_seconds = 0; + elapsed_ticks++; + if (elapsed_ticks == G_MAXUINT32) { + elapsed_ticks = 0; elapsed_cycle++; } - if (elapsed_seconds % 30 == 0) { + if (elapsed_ticks % 30 == 0) { g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Heartbeat"); }