Skip to content
Lior Halphon edited this page Nov 30, 2024 · 3 revisions

Definition

unsigned GB_run(GB_gameboy_t *gb);

In gb.h

Description

Runs an emulator instance for an atomic amount of time (usually a single instruction). Returns the number of time passed, in units of 8MHz (8,388,608Hz) ticks. If SameBoy was not compiled with timekeeping disabled, and turbo mode was not enabled, this function can potentially sleep before returning to maintain a correct frame rate.

Thread Safety

GB_run must not be called if the instance is being run in any thread, including the current one (via a callback).

See Also

Clone this wiki locally