This is similar to what I've implemented in vfkit. I use https://github.com/prashantgupta24/mac-sleep-notifier/ to detect when the machine wakes from sleep, qemu-guest-agent is running in the guest and listening over virtio-vsock, and I use https://www.qemu.org/docs/master/interop/qemu-ga-ref.html#qapidoc-16 to update the time in the guest.