[wpiutil] Add GetSystemTime() (#3840)

This portably gets the time in microseconds since the Unix epoch.
This commit is contained in:
Peter Johnson
2021-12-28 01:06:31 -06:00
committed by GitHub
parent 1e82595ffb
commit 5999a26fba
4 changed files with 41 additions and 3 deletions

View File

@@ -116,6 +116,18 @@ Java_edu_wpi_first_util_WPIUtilJNI_now
}
}
/*
* Class: edu_wpi_first_util_WPIUtilJNI
* Method: getSystemTime
* Signature: ()J
*/
JNIEXPORT jlong JNICALL
Java_edu_wpi_first_util_WPIUtilJNI_getSystemTime
(JNIEnv*, jclass)
{
return wpi::GetSystemTime();
}
/*
* Class: edu_wpi_first_util_WPIUtilJNI
* Method: addPortForwarder