They do give you 30 seconds of warning: https://cloud.google.com/compu...
Compute Engine performs the following steps to preempt an instance:
Compute Engine sends a preemption notice to the instance in the form of an ACPI G2 Soft Off signal.
If the instance does not stop after 30 seconds, Compute Engine sends an ACPI G3 Mechanical Off signal to the operating system.
Compute Engine transitions the instance to a TERMINATED state.
So if you're able to persist your state in less than 30 seconds, just watch for SIGTERM and you should be golden. Otherwise, checkpoint frequently.