Ok, here's an updated timer.c that fixes these concerns and also adds a
$postgresql$ header to the file.
It also removes the check if value == NULL, since that is now Asserted
instead. And it really should never happen based on the places where
setitimer is used.
The patch stays unchanged, just a
> Here is a patch that implements setitimer() on win32. With this patch
> applied, deadlock detection and statement_timeout now works.
>
> The file timer.c goes into src/backend/port/win32/.
Minor comments:
* "timer.c" has shmem.c in header
* I'd suggest Asserts on the remaining 2 limitations