MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / machine_tick

Function machine_tick

pdflinux.js:81–91  ·  view source on GitHub ↗
(m_ptr)

Source from the content-addressed store, hash-verified

79var last_updated = null;
80
81function 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
93function start_machine_interval(m_ptr) {
94 print_msg("starting the machine. please be patient...")

Callers 1

start_machine_intervalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected