mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Add disableMockTime to JNI (#3839)
This exposes the equivalent of SetNowImpl(nullptr) to Java.
This commit is contained in:
@@ -75,6 +75,19 @@ Java_edu_wpi_first_util_WPIUtilJNI_enableMockTime
|
||||
wpi::SetNowImpl([] { return mockNow; });
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_util_WPIUtilJNI
|
||||
* Method: disableMockTime
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_util_WPIUtilJNI_disableMockTime
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
mockTimeEnabled = false;
|
||||
wpi::SetNowImpl(nullptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_util_WPIUtilJNI
|
||||
* Method: setMockTime
|
||||
|
||||
Reference in New Issue
Block a user