File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
// Take a look at the license at the top of the repository in the LICENSE file.
2
2
3
- use std:: time:: SystemTime ;
3
+ use std:: time:: { Duration , SystemTime } ;
4
4
5
5
use glib:: translate:: * ;
6
6
@@ -45,8 +45,16 @@ impl PixbufAnimationIter {
45
45
46
46
#[ doc( alias = "gdk_pixbuf_animation_iter_get_delay_time" ) ]
47
47
#[ doc( alias = "get_delay_time" ) ]
48
- pub fn delay_time ( & self ) -> i32 {
49
- unsafe { ffi:: gdk_pixbuf_animation_iter_get_delay_time ( self . to_glib_none ( ) . 0 ) }
48
+ pub fn delay_time ( & self ) -> Option < Duration > {
49
+ unsafe {
50
+ let res = ffi:: gdk_pixbuf_animation_iter_get_delay_time ( self . to_glib_none ( ) . 0 ) ;
51
+
52
+ if res < 0 {
53
+ None
54
+ } else {
55
+ Some ( Duration :: from_millis ( res as u64 ) )
56
+ }
57
+ }
50
58
}
51
59
52
60
#[ doc( alias = "gdk_pixbuf_animation_iter_on_currently_loading_frame" ) ]
You can’t perform that action at this time.
0 commit comments