mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-05 08:12:29 -08:00
Revert VRServer tick interval (#644)
This commit is contained in:
1 parent
a2a3aa4648
commit
b9904d3e25
4 files changed
+5
-27
No files matched your search
@@ -66,7 +66,6 @@ public class VRServer extends Thread {
|
||||
private final NanoTimer fpsTimer = new NanoTimer();
|
||||
private final ProvisioningHandler provisioningHandler;
|
||||
private final ResetHandler resetHandler;
|
||||
private final Object wakeupLock = new Object();
|
||||
|
||||
/**
|
||||
* This function is used by VRWorkout, do not remove!
|
||||
@@ -298,18 +297,9 @@ public class VRServer extends Thread {
|
||||
vrcOSCHandler.update();
|
||||
vmcHandler.update();
|
||||
// final long time = System.currentTimeMillis() - start;
|
||||
synchronized (wakeupLock) {
|
||||
try {
|
||||
wakeupLock.wait(1); // 1000Hz
|
||||
} catch (InterruptedException ignored) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ThreadSafe
|
||||
public void wakeup() {
|
||||
synchronized (wakeupLock) {
|
||||
wakeupLock.notify();
|
||||
try {
|
||||
Thread.sleep(1); // 1000Hz
|
||||
} catch (InterruptedException ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,14 +51,6 @@ public abstract class ProtobufBridge<T extends VRTracker> implements Bridge {
|
||||
@ThreadSafe
|
||||
protected abstract void signalSend();
|
||||
|
||||
/**
|
||||
* Wakes the VRServer thread.
|
||||
*/
|
||||
@ThreadSafe
|
||||
protected void signalRecv() {
|
||||
Main.getVrServer().wakeup();
|
||||
}
|
||||
|
||||
@BridgeThread
|
||||
protected abstract boolean sendMessageReal(ProtobufMessage message);
|
||||
|
||||
|
||||
@@ -83,9 +83,7 @@ public class UnixSocketBridge extends SteamVRBridge implements AutoCloseable {
|
||||
try {
|
||||
boolean updated = this.updateSocket();
|
||||
updateMessageQueue();
|
||||
if (updated) {
|
||||
signalRecv();
|
||||
} else {
|
||||
if (!updated) {
|
||||
this.waitForData(10);
|
||||
}
|
||||
} catch (IOException ioError) {
|
||||
|
||||
@@ -85,9 +85,7 @@ public class WindowsNamedPipeBridge extends SteamVRBridge {
|
||||
if (pipe.state == PipeState.ERROR) {
|
||||
resetPipe();
|
||||
}
|
||||
if (pipesUpdated) {
|
||||
signalRecv();
|
||||
} else {
|
||||
if (!pipesUpdated) {
|
||||
if (pipe.state == PipeState.OPEN) {
|
||||
waitForData(10);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user