Like alarm(2).
Note that OpenModelica also sends SIGALRM to the process group when the alarm is triggered (in order to kill running simulations).
impure function alarm input Integer seconds; output Integer previousSeconds; end alarm;