mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Changed ticks function from &mut self to &self.
This commit is contained in:
@@ -4,6 +4,7 @@ when upgrading from a version of rust-sdl2 to another.
|
||||
### Unreleased
|
||||
|
||||
* Add patch to fix metal detection (https://bugzilla.libsdl.org/show_bug.cgi?id=4988)
|
||||
* Changed signature of `TimerSubsystem::ticks to accept `&self`.
|
||||
|
||||
### v0.34.3
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ impl TimerSubsystem {
|
||||
/// Gets the number of milliseconds elapsed since the timer subsystem was initialized.
|
||||
///
|
||||
/// It's recommended that you use another library for timekeeping, such as `time`.
|
||||
pub fn ticks(&mut self) -> u32 {
|
||||
pub fn ticks(&self) -> u32 {
|
||||
// Google says this is probably not thread-safe (TODO: prove/disprove this).
|
||||
unsafe { sys::SDL_GetTicks() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user