static frame_time_t machdep_amigaos4_gettimebase (void) { uae_u32 result = 0; uint32 machine = MACHINETYPE_UNKNOWN; GetMachineInfoTags(GMIT_Machine, &machine, TAG_DONE); if (machine == MACHINETYPE_AMIGAONE) { struct EClockVal etime; result = ReadEClock (&etime); } return result; }
int osdep_inithrtimer (void) { static int done = 0; if (!done) { struct EClockVal etime; timebase = ReadEClock (&etime); write_log ("EClock frequency:%.6f MHz\n", timebase/1e6); done = 1; } return 1; }
BOOL PreTimer( struct AHIPrivAudioCtrl* audioctrl ) { ULONG pretimer_period; // Clocks between PreTimer calls ULONG mixer_time; // Clocks spent in mixer pretimer_period = audioctrl->ahiac_Timer.EntryTime.ev_lo; ReadEClock( &audioctrl->ahiac_Timer.EntryTime ); pretimer_period = audioctrl->ahiac_Timer.EntryTime.ev_lo - pretimer_period; mixer_time = pretimer_period - ( audioctrl->ahiac_Timer.ExitTime.ev_lo - audioctrl->ahiac_Timer.EntryTime.ev_lo ); if( pretimer_period != 0 ) { audioctrl->ahiac_UsedCPU = ( mixer_time << 8 ) / pretimer_period; } return ( audioctrl->ahiac_UsedCPU <= audioctrl->ahiac_MaxCPU ); }
void PostTimer( struct AHIPrivAudioCtrl* audioctrl ) { ReadEClock( &audioctrl->ahiac_Timer.ExitTime ); }