Files
allwpilib/hal/src/main/native/cpp/jni/ConstantsJNI.cpp

29 lines
723 B
C++
Raw Normal View History

// 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.
#include <jni.h>
2018-05-13 17:09:56 -07:00
#include <cassert>
#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"
2025-11-07 20:00:05 -05:00
using namespace wpi::hal;
extern "C" {
/*
2025-11-07 19:55:43 -05:00
* Class: org_wpilib_hardware_hal_ConstantsJNI
* 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)
{
jint value = HAL_GetSystemClockTicksPerMicrosecond();
return value;
}
2018-05-13 17:09:56 -07:00
} // extern "C"