mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-13 23:06:22 -04:00
added some documentation
This commit is contained in:
parent
b40256dd7c
commit
336cd04fee
@ -242,7 +242,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>Frequency</string>
|
<string>Frequency</string>
|
||||||
<int>20</int>
|
<int>50</int>
|
||||||
</entry>
|
</entry>
|
||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="1060" y="460"/>
|
<pos x="1060" y="460"/>
|
||||||
|
@ -43,7 +43,7 @@ public class RealTimeClock implements ModelStateObserver {
|
|||||||
public void handleEvent(ModelEvent event) {
|
public void handleEvent(ModelEvent event) {
|
||||||
switch (event.getType()) {
|
switch (event.getType()) {
|
||||||
case STARTED:
|
case STARTED:
|
||||||
if (frequency > 50)
|
if (frequency > 50) // if frequency is high it is not necessary to update the GUI at every clock
|
||||||
output.removeObserver(GuiModelObserver.class);
|
output.removeObserver(GuiModelObserver.class);
|
||||||
|
|
||||||
int delay = 500 / frequency;
|
int delay = 500 / frequency;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user