synchronized getAutosensData
This commit is contained in:
parent
2f8ca8bb04
commit
bbc68b2266
1 changed files with 16 additions and 14 deletions
|
@ -522,6 +522,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static AutosensData getAutosensData(long time) {
|
public static AutosensData getAutosensData(long time) {
|
||||||
|
synchronized (dataLock) {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (time > now)
|
if (time > now)
|
||||||
return null;
|
return null;
|
||||||
|
@ -538,6 +539,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static AutosensData getLastAutosensData() {
|
public static AutosensData getLastAutosensData() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue