aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx/sfx_time.h
diff options
context:
space:
mode:
authorAndre Heider2009-02-24 18:31:05 +0000
committerAndre Heider2009-02-24 18:31:05 +0000
commit357299c5705d6856e070e537610275f1943e6653 (patch)
tree3a778bb49af51f3633d594af46e39e3bd0323c5d /engines/sci/sfx/sfx_time.h
parent3082586230688f27badf707faf95cadc8f761b21 (diff)
downloadscummvm-rg350-357299c5705d6856e070e537610275f1943e6653.tar.gz
scummvm-rg350-357299c5705d6856e070e537610275f1943e6653.tar.bz2
scummvm-rg350-357299c5705d6856e070e537610275f1943e6653.zip
substitute all time related functions, removing sci_gettime sci_get_current_time altogether.
svn-id: r38845
Diffstat (limited to 'engines/sci/sfx/sfx_time.h')
-rw-r--r--engines/sci/sfx/sfx_time.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/sfx/sfx_time.h b/engines/sci/sfx/sfx_time.h
index 512dc70cd1..2a9be71ced 100644
--- a/engines/sci/sfx/sfx_time.h
+++ b/engines/sci/sfx/sfx_time.h
@@ -26,20 +26,21 @@
#ifndef SCI_SFX_SFX_TIME_H
#define SCI_SFX_SFX_TIME_H
+#include "common/scummsys.h"
+
namespace Sci {
struct sfx_timestamp_t {
- long secs;
- long usecs;
+ uint32 msecs;
int frame_rate;
int frame_offset;
- /* Total time: secs + usecs + frame_offset/frame_rate */
+ /* Total time: msecs + frame_offset/frame_rate */
};
-sfx_timestamp_t sfx_new_timestamp(long secs, long usecs, int frame_rate);
+sfx_timestamp_t sfx_new_timestamp(const uint32 msecs, const int frame_rate);
/* Creates a new mutable timestamp
-** Parameters: (long x long) (secs, usecs): Initial timestamp
+** Parameters: (uint32) msecs: Initial timestamp
** (int) frame_rate: Frame rate, for increasing the time stamp
*/
@@ -66,18 +67,17 @@ int sfx_timestamp_frame_diff(sfx_timestamp_t a, sfx_timestamp_t b);
** Returns : (int) a-b
*/
-long sfx_timestamp_usecs_diff(sfx_timestamp_t a, sfx_timestamp_t b);
-/* Computes the difference (# of microseconds) between two timestamps
+int sfx_timestamp_msecs_diff(sfx_timestamp_t a, sfx_timestamp_t b);
+/* Computes the difference (# of milliseconds) between two timestamps
** Parameters: (sfx_timestamp) a: See below
** (sfx_timestamp) b: See below
-** Returns : (long) a-b
+** Returns : (int) a-b
*/
-void sfx_timestamp_gettime(sfx_timestamp_t *timestamp, long *secs, long *usecs);
+void sfx_timestamp_gettime(sfx_timestamp_t *timestamp, uint32 *msecs);
/* Determines the time described by a given timestamp
** Parameters: (sfx_timestamp_t *) timestamp: Timestamp to read from
-** Returns : (int * x int *) (secs, usecs): Seconds and microseconds since
-** the epoch described there
+** Returns : (uint32 *) msecs: Milliseconds since startup
*/
} // End of namespace Sci