2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2016-07-08 00:08:07 -07:00
|
|
|
|
|
|
|
|
#include <jni.h>
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
#include <cassert>
|
2016-07-08 00:08:07 -07:00
|
|
|
|
|
|
|
|
#include "HALUtil.h"
|
2018-09-20 21:59:46 -07:00
|
|
|
#include "edu_wpi_first_hal_ConstantsJNI.h"
|
2018-07-20 00:03:45 -07:00
|
|
|
#include "hal/Constants.h"
|
2016-07-08 00:08:07 -07:00
|
|
|
|
2020-06-26 17:12:55 -07:00
|
|
|
using namespace hal;
|
2016-10-31 23:04:49 -07:00
|
|
|
|
2016-07-08 00:08:07 -07:00
|
|
|
extern "C" {
|
|
|
|
|
/*
|
2018-09-20 21:59:46 -07:00
|
|
|
* Class: edu_wpi_first_hal_ConstantsJNI
|
2016-07-08 00:08:07 -07:00
|
|
|
* Method: getSystemClockTicksPerMicrosecond
|
|
|
|
|
* Signature: ()I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2018-09-20 21:59:46 -07:00
|
|
|
Java_edu_wpi_first_hal_ConstantsJNI_getSystemClockTicksPerMicrosecond
|
2018-05-13 17:09:56 -07:00
|
|
|
(JNIEnv* env, jclass)
|
|
|
|
|
{
|
2016-07-09 00:24:26 -07:00
|
|
|
jint value = HAL_GetSystemClockTicksPerMicrosecond();
|
2016-07-08 00:08:07 -07:00
|
|
|
return value;
|
|
|
|
|
}
|
2018-05-13 17:09:56 -07:00
|
|
|
} // extern "C"
|