(m_ptr)
| 79 | var last_updated = null; |
| 80 | |
| 81 | function machine_tick(m_ptr) { |
| 82 | total_instrs += _virt_machine_run(m_ptr); |
| 83 | let now = Date.now(); |
| 84 | let time_interval = now - last_updated; |
| 85 | if (time_interval > 1000) { |
| 86 | let k_ips = Math.round(total_instrs / ((time_interval) / 1000) / 1000); |
| 87 | globalThis.getField("speed_indicator").value = `Speed: ${k_ips} kIPS`; |
| 88 | total_instrs = 0; |
| 89 | last_updated = now; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | function start_machine_interval(m_ptr) { |
| 94 | print_msg("starting the machine. please be patient...") |
no outgoing calls
no test coverage detected