mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-12-06 06:17:16 +00:00
Better truetime init
This commit is contained in:
1 parent
662018834e
commit
58b24d5137
2 files changed
+8
-3
No files matched your search
@@ -5,12 +5,11 @@ import com.instacart.library.truetime.TrueTime;
|
||||
import java.io.IOException;
|
||||
|
||||
public class TrueTimeTask extends BootTask {
|
||||
/** @noinspection BusyWait*/
|
||||
public TrueTimeTask() {
|
||||
super(() -> {
|
||||
while (true) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
try {
|
||||
TrueTime.build().withNtpHost("0.ru.pool.ntp.org").initialize();
|
||||
TrueTime.build().withNtpHost("1.ru.pool.ntp.org").initialize();
|
||||
break;
|
||||
} catch (IOException ignore) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user