Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Functions | Variables
BTUtils.cxx File Reference
#include "org_direct_bt_BTUtils.h"
#include <cstdint>
#include <cinttypes>
#include <time.h>
#include <jau/dfa_utf8_decode.hpp>
#include <jau/environment.hpp>
#include "helper_base.hpp"
Include dependency graph for BTUtils.cxx:

Go to the source code of this file.

Functions

jlong Java_org_direct_1bt_BTUtils_currentTimeMillis (JNIEnv *env, jclass clazz)
 See http://man7.org/linux/man-pages/man2/clock_gettime.2.html More...
 
jlong Java_org_direct_1bt_BTUtils_wallClockSeconds (JNIEnv *env, jclass clazz)
 
jlong Java_org_direct_1bt_BTUtils_startupTimeMillisImpl (JNIEnv *env, jclass clazz)
 
jstring Java_org_direct_1bt_BTUtils_decodeUTF8String (JNIEnv *env, jclass clazz, jbyteArray jbuffer, jint offset, jint size)
 

Variables

static const uint64_t NanoPerMilli = 1000000UL
 
static const uint64_t MilliPerOne = 1000UL
 

Function Documentation

◆ Java_org_direct_1bt_BTUtils_currentTimeMillis()

jlong Java_org_direct_1bt_BTUtils_currentTimeMillis ( JNIEnv *  env,
jclass  clazz 
)

See http://man7.org/linux/man-pages/man2/clock_gettime.2.html

Regarding avoiding kernel via VDSO, see http://man7.org/linux/man-pages/man7/vdso.7.html, clock_gettime seems to be well supported at least on kernel >= 4.4. Only bfin and sh are missing, while ia64 seems to be complicated.

Definition at line 49 of file BTUtils.cxx.

◆ Java_org_direct_1bt_BTUtils_decodeUTF8String()

jstring Java_org_direct_1bt_BTUtils_decodeUTF8String ( JNIEnv *  env,
jclass  clazz,
jbyteArray  jbuffer,
jint  offset,
jint  size 
)

Definition at line 77 of file BTUtils.cxx.

Here is the call graph for this function:

◆ Java_org_direct_1bt_BTUtils_startupTimeMillisImpl()

jlong Java_org_direct_1bt_BTUtils_startupTimeMillisImpl ( JNIEnv *  env,
jclass  clazz 
)

Definition at line 70 of file BTUtils.cxx.

◆ Java_org_direct_1bt_BTUtils_wallClockSeconds()

jlong Java_org_direct_1bt_BTUtils_wallClockSeconds ( JNIEnv *  env,
jclass  clazz 
)

Definition at line 60 of file BTUtils.cxx.

Variable Documentation

◆ MilliPerOne

const uint64_t MilliPerOne = 1000UL
static

Definition at line 39 of file BTUtils.cxx.

◆ NanoPerMilli

const uint64_t NanoPerMilli = 1000000UL
static

Definition at line 38 of file BTUtils.cxx.