2016-07-08 00:08:07 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2020-06-26 17:12:55 -07:00
|
|
|
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
2016-07-08 00:08:07 -07:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#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"
|