File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,12 @@ extern "C" {
7979 pub fn timer_undo_split ( ) ;
8080 /// Resets the timer.
8181 pub fn timer_reset ( ) ;
82+ /// Accesses the index of the split the attempt is currently on. If there's
83+ /// no attempt in progress, `-1` is returned instead. This returns an
84+ /// index that is equal to the amount of segments when the attempt is
85+ /// finished, but has not been reset. So you need to be careful when using
86+ /// this value for indexing.
87+ pub fn timer_current_split_index ( ) -> i32 ;
8288 /// Sets a custom key value pair. This may be arbitrary information that the
8389 /// auto splitter wants to provide for visualization. The pointers need to
8490 /// point to valid UTF-8 encoded text with the respective given length.
Original file line number Diff line number Diff line change @@ -112,6 +112,15 @@ pub fn state() -> TimerState {
112112 }
113113}
114114
115+ /// Accesses the index of the split the attempt is currently on. If there's
116+ /// no attempt in progress, `-1` is returned instead. This returns an
117+ /// index that is equal to the amount of segments when the attempt is
118+ /// finished, but has not been reset. So you need to be careful when using
119+ /// this value for indexing.
120+ pub fn current_split_index ( ) -> i32 {
121+ unsafe { sys:: timer_current_split_index ( ) }
122+ }
123+
115124/// Sets the game time.
116125#[ inline]
117126pub fn set_game_time ( time : time:: Duration ) {
You can’t perform that action at this time.
0 commit comments