[wpilib] RobotController: Add isSystemTimeValid() (#5696)

This returns true when the system date/time (wall clock) is valid.
This commit is contained in:
Peter Johnson
2023-09-30 09:22:51 -07:00
committed by GitHub
parent e56f1a3632
commit d404af5f24
9 changed files with 65 additions and 1 deletions

View File

@@ -151,6 +151,21 @@ Java_edu_wpi_first_hal_HAL_getRSLState
return val;
}
/*
* Class: edu_wpi_first_hal_HAL
* Method: getSystemTimeValid
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL
Java_edu_wpi_first_hal_HAL_getSystemTimeValid
(JNIEnv* env, jclass)
{
int32_t status = 0;
bool val = HAL_GetSystemTimeValid(&status);
CheckStatus(env, status);
return val;
}
/*
* Class: edu_wpi_first_hal_HAL
* Method: getPortWithModule