Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emulator ¶
type Emulator struct {
// contains filtered or unexported fields
}
Emulator is a device which you can use to simulate a slower computer's clockspeed.
func NewEmulator ¶
NewEmulator returns a new emulator based on some number of hertz
func (*Emulator) WaitForCycles ¶
WaitForCycles will wait for a period of time that would allow the emulator to slow down the current thread based on its hertz. Whatever "waiting" means is up to the caller. Note that this function is not perfect; I've observed situations where the cycle rate can overclock a bit. The point is merely to get close to the correct rate.
Click to show internal directories.
Click to hide internal directories.