|  | 
| static native long | currentTimeMillis () | 
|  | Returns current monotonic time in milliseconds.  More... 
 | 
|  | 
| static native long | wallClockSeconds () | 
|  | Returns current wall-clock system time of dayin seconds since Unix Epoch00:00:00 UTC on 1 January 1970.  More...
 | 
|  | 
| static long | startupTimeMillis () | 
|  | Returns the startup time in monotonic time in milliseconds of the native module.  More... 
 | 
|  | 
| static long | elapsedTimeMillis () | 
|  | Returns current elapsed monotonic time in milliseconds since module startup, see startupTimeMillis().  More... 
 | 
|  | 
| static long | elapsedTimeMillis (final long current_ts) | 
|  | Returns elapsed monotonic time in milliseconds since module startup comparing against the given timestamp, see startupTimeMillis().  More... 
 | 
|  | 
| static void | fprintf_td (final PrintStream out, final String format, final Object ... args) | 
|  | Convenient PrintStream#printf(String, Object...) invocation, prepending the elapsedTimeMillis() timestamp.  More... 
 | 
|  | 
| static void | println (final PrintStream out, final String msg) | 
|  | Convenient PrintStream#println(String) invocation, prepending the elapsedTimeMillis() timestamp.  More... 
 | 
|  | 
| static void | print (final PrintStream out, final String msg) | 
|  | Convenient PrintStream#print(String) invocation, prepending the elapsedTimeMillis() timestamp.  More... 
 | 
|  | 
| static int | getHCIConnSupervisorTimeout (final int conn_latency, final int conn_interval_max_ms, final int min_result_ms, final int multiplier) | 
|  | Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows:  More... 
 | 
|  | 
| static String | bytesHexString (final byte[] bytes, final int offset, final int length, final boolean lsbFirst) | 
|  | Produce a lower-case hexadecimal string representation of the given byte values.  More... 
 | 
|  | 
| static StringBuilder | byteHexString (final StringBuilder sb, final byte value, final boolean lowerCase) | 
|  | Produce a hexadecimal string representation of the given byte value.  More... 
 | 
|  | 
| static native String | decodeUTF8String (final byte[] buffer, final int offset, final int size) | 
|  | Returns all valid consecutive UTF-8 characters within buffer in the range offset -> size or until EOS.  More... 
 | 
|  | 
Definition at line 29 of file BTUtils.java.
 
  
  | 
        
          | static String org.direct_bt.BTUtils.bytesHexString | ( | final byte[] | bytes, |  
          |  |  | final int | offset, |  
          |  |  | final int | length, |  
          |  |  | final boolean | lsbFirst |  
          |  | ) |  |  |  | static | 
 
Produce a lower-case hexadecimal string representation of the given byte values. 
If lsbFirst is true, orders LSB left -> MSB right, usual for byte streams.
 Otherwise orders MSB left -> LSB right, usual for readable integer values. 
- Parameters
- 
  
    | bytes | the byte array to represent |  | offset | offset in byte array to the first byte to print. |  | length | number of bytes to print. If negative, will use . |  | lsbFirst | true having the least significant byte printed first (lowest addressed byte to highest), otherwise have the most significant byte printed first (highest addressed byte to lowest). |  
 
- Returns
- the hex-string representation of the data 
Definition at line 123 of file BTUtils.java.
 
 
  
  | 
        
          | static int org.direct_bt.BTUtils.getHCIConnSupervisorTimeout | ( | final int | conn_latency, |  
          |  |  | final int | conn_interval_max_ms, |  
          |  |  | final int | min_result_ms, |  
          |  |  | final int | multiplier |  
          |  | ) |  |  |  | static | 
 
Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows: 
 ( 1 + conn_latency ) * conn_interval_max_ms * max(2, multiplier) [ms]
 If above result is smaller than the given min_result_ms, min_result_ms/10 will be returned. 
- Parameters
- 
  
    | conn_latency | the connection latency |  | conn_interval_max_ms | the maximum connection interval in [ms] |  | min_result_ms | the minimum resulting supervisor timeout, defaults to 500ms. If above formula results in a smaller value, min_result_ms/10 will be returned. |  | multiplier | recommendation is 6, we use 10 as default for safety. |  
 
- Returns
- the resulting supervising timeout in 1/10 [ms], suitable for the BTDevice#connectLE(short, short, short, short, short, short). 
- See also
- BTDevice::connectLE(short, short, short, short, short, short) 
Definition at line 103 of file BTUtils.java.