aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-07-18 15:22:58 +0300
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit27683945e609d50947cecaf1b947fd85e40e9159 (patch)
treee5b7171e96ccddf06b62921c0b792f1001208b54
parent5ae4d3bf9eac72cc554d6ecbcd89528dda9cea5c (diff)
downloadscummvm-rg350-27683945e609d50947cecaf1b947fd85e40e9159.tar.gz
scummvm-rg350-27683945e609d50947cecaf1b947fd85e40e9159.tar.bz2
scummvm-rg350-27683945e609d50947cecaf1b947fd85e40e9159.zip
LAB: Simplify timeDiff()
-rw-r--r--engines/lab/timing.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/engines/lab/timing.cpp b/engines/lab/timing.cpp
index acba16d98e..a9f593e668 100644
--- a/engines/lab/timing.cpp
+++ b/engines/lab/timing.cpp
@@ -105,24 +105,8 @@ void anyTimeDiff(uint32 sec1, uint32 micros1, uint32 sec2, uint32 micros2, uint3
/*****************************************************************************/
void timeDiff(uint32 sec, uint32 micros, uint32 *diffSec, uint32 *diffMicros) {
uint32 curSec, curMicros;
-
- *diffSec = 0;
- *diffMicros = 0;
-
getTime(&curSec, &curMicros);
-
- if (curSec > sec) /* Already passed the time */
- return;
- else if ((curSec == sec) && (curMicros >= micros)) /* Already passed the time */
- return;
-
- if (curMicros > micros) {
- *diffSec = sec - curSec - 1;
- *diffMicros = (ONESECOND - curMicros) + micros;
- } else {
- *diffSec = sec - curSec;
- *diffMicros = micros - curMicros;
- }
+ anyTimeDiff(curSec, curMicros, sec, micros, diffSec, diffMicros);
}
/*****************************************************************************/