Ejemplo n.º 1
0
/* disable cpu_get_ticks() : the clock is stopped. You must not call
   cpu_get_ticks() after that.  */
void cpu_disable_ticks(void)
{
    if (timers_state.cpu_ticks_enabled) {
        timers_state.cpu_ticks_offset = cpu_get_ticks();
        timers_state.cpu_clock_offset = cpu_get_clock();
        timers_state.cpu_ticks_enabled = 0;
    }
}
Ejemplo n.º 2
0
void cpu_set_sim_ticks(void)
{
  if(timers_state.cpu_ticks_enabled) {
    timers_state.cpu_sim_ticks_offset = cpu_get_ticks();
  } else {
    timers_state.cpu_sim_ticks_offset = timers_state.cpu_ticks_offset;
  }
}
Ejemplo n.º 3
0
/* TSC handling */
uint64_t cpu_get_tsc(CPUX86State *env)
{
    return cpu_get_ticks();
}