| 435 | } |
| 436 | |
| 437 | void *timers_take_snapshot(uc_engine *uc) { |
| 438 | size_t size = sizeof(struct TimerState); |
| 439 | void *result = malloc(size); |
| 440 | memcpy(result, &uc->fw->timers, size); |
| 441 | return result; |
| 442 | } |
| 443 | |
| 444 | void timers_restore_snapshot(uc_engine *uc, void *snapshot) { |
| 445 | memcpy(&uc->fw->timers, snapshot, sizeof(struct TimerState)); |