diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-30 23:35:06 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-30 23:35:06 +0200 |
commit | a01ad865cd431f919b2d177ccfb035ee6c7c1609 (patch) | |
tree | 73b7536252c67ad2053253d4c8369ef6402d8fdf /src/client.cpp | |
parent | f84906fd493fe77a0f6591afb167ee62c9315506 (diff) | |
download | mana-a01ad865cd431f919b2d177ccfb035ee6c7c1609.tar.gz mana-a01ad865cd431f919b2d177ccfb035ee6c7c1609.tar.bz2 mana-a01ad865cd431f919b2d177ccfb035ee6c7c1609.tar.xz mana-a01ad865cd431f919b2d177ccfb035ee6c7c1609.zip |
De-dustify the get_elapsed-time function documentation a bit.
Trivial.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index 437e1f06..9c5bdde7 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -153,16 +153,12 @@ Uint32 nextSecond(Uint32 interval, void *param) return interval; } -/** - * @return the elapsed time in milliseconds - * between two tick values. - */ -int get_elapsed_time(int start_time) +int get_elapsed_time(int startTime) { - if (start_time <= tick_time) - return (tick_time - start_time) * MILLISECONDS_IN_A_TICK; + if (startTime <= tick_time) + return (tick_time - startTime) * MILLISECONDS_IN_A_TICK; else - return (tick_time + (MAX_TICK_VALUE - start_time)) + return (tick_time + (MAX_TICK_VALUE - startTime)) * MILLISECONDS_IN_A_TICK; } |