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
|
||||
public static AutosensData getAutosensData(long time) {
|
||||
synchronized (dataLock) {
|
||||
long now = System.currentTimeMillis();
|
||||
if (time > now)
|
||||
return null;
|
||||
|
@ -538,6 +539,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static AutosensData getLastAutosensData() {
|
||||
|
|
Loading…
Reference in a new issue