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
|
|
|
|
2026-01-04 00:41:53 -08:00
|
|
|
#include "HALUtil.hpp"
|
2025-11-07 19:55:43 -05:00
|
|
|
#include "org_wpilib_hardware_hal_ConstantsJNI.h"
|
2025-11-07 19:56:21 -05:00
|
|
|
#include "wpi/hal/Constants.h"
|
2016-07-08 00:08:07 -07:00
|
|
|
|
2025-11-07 20:00:05 -05:00
|
|
|
using namespace wpi::hal;
|
2016-10-31 23:04:49 -07:00
|
|
|
|
2016-07-08 00:08:07 -07:00
|
|
|
extern "C" {
|
|
|
|
|
/*
|
2025-11-07 19:55:43 -05:00
|
|
|
* Class: org_wpilib_hardware_hal_ConstantsJNI
|
2016-07-08 00:08:07 -07:00
|
|
|
* Method: getSystemClockTicksPerMicrosecond
|
|
|
|
|
* Signature: ()I
|
|
|
|
|
*/
|
|
|
|
|
JNIEXPORT jint JNICALL
|
2025-11-07 19:55:43 -05:00
|
|
|
Java_org_wpilib_hardware_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"
|