mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Add timeout monitor for Bluetooth connections.
This commit is contained in:
@@ -16,6 +16,11 @@ public class ArrayClock implements Clock {
|
||||
return times[index++];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long nanoTime() {
|
||||
return times[index++] * 1_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sleep(long milliseconds) throws InterruptedException {
|
||||
Thread.sleep(milliseconds);
|
||||
|
||||
@@ -17,6 +17,11 @@ public class SettableClock implements Clock {
|
||||
return time.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long nanoTime() {
|
||||
return time.get() * 1_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sleep(long milliseconds) throws InterruptedException {
|
||||
Thread.sleep(milliseconds);
|
||||
|
||||
Reference in New Issue
Block a user