mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Reorganised Guice modules. Contribute entropy to pool on Linux/Android.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.briarproject.api.crypto;
|
||||
package org.briarproject.api.system;
|
||||
|
||||
/**
|
||||
* Uses a platform-specific source to provide a seed for a pseudo-random
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.briarproject.api.system;
|
||||
|
||||
/** Default clock implementation. */
|
||||
public class SystemClock implements Clock {
|
||||
|
||||
public long currentTimeMillis() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public void sleep(long milliseconds) throws InterruptedException {
|
||||
Thread.sleep(milliseconds);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package org.briarproject.api.system;
|
||||
|
||||
import java.util.TimerTask;
|
||||
|
||||
/** Default timer implementation. */
|
||||
public class SystemTimer implements Timer {
|
||||
|
||||
private final java.util.Timer timer = new java.util.Timer();
|
||||
|
||||
public void cancel() {
|
||||
timer.cancel();
|
||||
}
|
||||
|
||||
public int purge() {
|
||||
return timer.purge();
|
||||
}
|
||||
|
||||
public void schedule(TimerTask task, long delay) {
|
||||
timer.schedule(task, delay);
|
||||
}
|
||||
|
||||
public void schedule(TimerTask task, long delay, long period) {
|
||||
timer.schedule(task, delay, period);
|
||||
}
|
||||
|
||||
public void scheduleAtFixedRate(TimerTask task, long delay, long period) {
|
||||
timer.scheduleAtFixedRate(task, delay, period);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user