mirror of
https://github.com/irmen/ksim65.git
synced 2024-06-06 22:29:33 +00:00
trying to optimize debug window drawing: update less often
This commit is contained in:
parent
e504e420ac
commit
b299880428
|
@ -7,7 +7,6 @@ import java.awt.image.BufferedImage
|
|||
import java.awt.image.VolatileImage
|
||||
import java.awt.event.*
|
||||
import javax.swing.*
|
||||
import javax.swing.Timer
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -239,7 +239,7 @@ class C64Machine(title: String) : IVirtualMachine {
|
|||
}
|
||||
|
||||
fun start() {
|
||||
javax.swing.Timer(10) {
|
||||
javax.swing.Timer(50) {
|
||||
debugWindow.updateCpu(cpu, bus)
|
||||
}.start()
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.io.File
|
|||
import java.lang.Integer.parseInt
|
||||
import java.util.*
|
||||
import javax.swing.*
|
||||
import javax.swing.Timer
|
||||
|
||||
|
||||
/**
|
||||
|
@ -386,7 +385,7 @@ class MainWindow(title: String) : JFrame(title), KeyListener, MouseInputListener
|
|||
fun start() {
|
||||
// repaint the screen's back buffer ~60 times per second
|
||||
var cursorBlink = 0L
|
||||
val repaintTimer = Timer(1000 / 60) {
|
||||
val repaintTimer = javax.swing.Timer(1000 / 60) {
|
||||
repaint()
|
||||
if(it.`when` - cursorBlink > 200L) {
|
||||
cursorBlink = it.`when`
|
||||
|
|
|
@ -73,7 +73,7 @@ class VirtualMachine(title: String) : IVirtualMachine {
|
|||
}
|
||||
|
||||
fun start() {
|
||||
javax.swing.Timer(10) {
|
||||
javax.swing.Timer(50) {
|
||||
debugWindow.updateCpu(cpu, bus)
|
||||
}.start()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user