-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4efe669
commit fd82dad
Showing
4 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#[cfg(feature = "unstable")] | ||
extern "C" { | ||
/// Accesses the index of the split the attempt is currently on. If there's | ||
/// no attempt in progress, `-1` is returned instead. This returns an | ||
/// index that is equal to the amount of segments when the attempt is | ||
/// finished, but has not been reset. So you need to be careful when using | ||
/// this value for indexing. | ||
fn timer_current_split_index() -> i32; | ||
} | ||
|
||
/// Accesses the index of the split the attempt is currently on. If there's | ||
/// no attempt in progress, `-1` is returned instead. This returns an | ||
/// index that is equal to the amount of segments when the attempt is | ||
/// finished, but has not been reset. So you need to be careful when using | ||
/// this value for indexing. | ||
pub fn maybe_timer_current_split_index() -> Option<i32> { | ||
#[cfg(feature = "unstable")] | ||
return Some(unsafe { timer_current_split_index() }); | ||
#[allow(unreachable_code)] | ||
None | ||
} |