Skip to content

Commit a2fed71

Browse files
committed
Use correct integer types in timer
1 parent 6e0510f commit a2fed71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sdl2/timer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use libc::{uint32_t, c_void};
22

33
pub use sys::timer as ll;
44

5-
pub fn get_ticks() -> usize {
6-
unsafe { ll::SDL_GetTicks() as usize }
5+
pub fn get_ticks() -> u32 {
6+
unsafe { ll::SDL_GetTicks() }
77
}
88

99
pub fn get_performance_counter() -> u64 {
@@ -14,8 +14,8 @@ pub fn get_performance_frequency() -> u64 {
1414
unsafe { ll::SDL_GetPerformanceFrequency() }
1515
}
1616

17-
pub fn delay(ms: usize) {
18-
unsafe { ll::SDL_Delay(ms as u32) }
17+
pub fn delay(ms: u32) {
18+
unsafe { ll::SDL_Delay(ms) }
1919
}
2020

2121
pub type TimerCallback = extern "C" fn (interval: uint32_t, param: *const c_void) -> u32;

0 commit comments

Comments
 (0)