You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/bwapi/BWClientConfiguration.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -29,10 +29,10 @@ public class BWClientConfiguration {
29
29
publicbooleanasync = false;
30
30
31
31
/**
32
-
* If JBWAPI detects that this much time (in milliseconds) has passed since a bot's event handlers began, returns control back to BWAPI.
32
+
* If JBWAPI detects that this much time (in nanoseconds) has passed since a bot's event handlers began, returns control back to BWAPI.
33
33
* Real-time human play typically uses the "fastest" game speed, which has 42.86ms (42,860ns) between frames.
34
34
*/
35
-
publicintasyncFrameDurationMillis = 40;
35
+
publicintasyncFrameDurationNanos = 40000;
36
36
37
37
/**
38
38
* The maximum number of frames to buffer while waiting on a bot.
@@ -53,8 +53,8 @@ public class BWClientConfiguration {
53
53
* Checks that the configuration is in a valid state. Throws an IllegalArgumentException if it isn't.
54
54
*/
55
55
publicvoidvalidate() {
56
-
if (async && asyncFrameDurationMillis < 0) {
57
-
thrownewIllegalArgumentException("asyncFrameDurationMillis needs to be a non-negative number (it's how long JBWAPI waits for a bot response before returning control to BWAPI).");
56
+
if (async && asyncFrameDurationNanos < 0) {
57
+
thrownewIllegalArgumentException("asyncFrameDurationNanos needs to be a non-negative number (it's how long JBWAPI waits for a bot response before returning control to BWAPI).");
58
58
}
59
59
if (async && asyncFrameBufferSize < 1) {
60
60
thrownewIllegalArgumentException("asyncFrameBufferSize needs to be a positive number (There needs to be at least one frame buffer).");
0 commit comments