Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
26 #include "org_direct_bt_BTUtils.h"
54 clock_gettime(CLOCK_MONOTONIC, &t);
55 uint64_t res =
static_cast<uint64_t
>( t.tv_sec ) *
MilliPerOne +
65 clock_gettime(CLOCK_REALTIME, &t);
66 return (jlong)(
static_cast<uint64_t
>( t.tv_sec ) );
80 const int buffer_size = env->GetArrayLength(jbuffer);
81 if( 0 == buffer_size ) {
82 return env->NewStringUTF(
"");
84 if( buffer_size < offset+size ) {
94 uint8_t * buffer_ptr = criticalArray.
get(jbuffer, criticalArray.Mode::NO_UPDATE_AND_RELEASE);
95 if( NULL == buffer_ptr ) {
jlong Java_org_direct_1bt_BTUtils_currentTimeMillis(JNIEnv *env, jclass clazz)
See http://man7.org/linux/man-pages/man2/clock_gettime.2.html
jstring Java_org_direct_1bt_BTUtils_decodeUTF8String(JNIEnv *env, jclass clazz, jbyteArray jbuffer, jint offset, jint size)
jstring from_string_to_jstring(JNIEnv *env, const std::string &str)
jlong Java_org_direct_1bt_BTUtils_startupTimeMillisImpl(JNIEnv *env, jclass clazz)
jlong Java_org_direct_1bt_BTUtils_wallClockSeconds(JNIEnv *env, jclass clazz)
PRAGMA_DISABLE_WARNING_POP constexpr_cxx20 std::string to_string(const endian &v) noexcept
Return std::string representation of the given jau::endian.
static const uint64_t NanoPerMilli
T * get(U jarray_val, Mode mode_val=UPDATE_AND_RELEASE)
Acquired the primitive array.
uint32_t dfa_utf8_decode(uint32_t &state, uint32_t &codep, const uint32_t byte_value)
static const uint64_t startupTimeMilliseconds
Module startup time t0 in monotonic time in milliseconds.
static const uint64_t MilliPerOne