Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
5e0cc0a7
Commit
5e0cc0a7
authored
Sep 27, 2016
by
Björn Richerzhagen
Browse files
LocationListeners are triggered periodically, c.f. API doc
parent
4d2fbe7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/DefaultTopologyComponent.java
View file @
5e0cc0a7
...
...
@@ -360,12 +360,9 @@ public class DefaultTopologyComponent implements TopologyComponent {
if
(!
listeners
.
isEmpty
())
{
// Only reschedule, if at least one listener is ... listening
Location
newLoc
=
getLastLocation
();
if
(
lastLocation
==
null
||
lastLocation
.
distanceTo
(
newLoc
)
>
0
)
{
listeners
.
forEach
((
LocationListener
listener
)
->
listener
listeners
.
forEach
((
LocationListener
listener
)
->
listener
.
onLocationChanged
(
getHost
(),
newLoc
));
lastLocation
=
newLoc
;
}
lastLocation
=
newLoc
;
Event
.
scheduleWithDelay
(
interval
,
this
,
null
,
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment