POSIX obsoleted the getitimer/setitimer API a decade ago, and now's a good time for Emacs to stop using this obsolescent API, partly to simplify other timestamp improvements that I have in mind, partly to head off any other lurking bugs like the problem I just fixed in commit 238c7cd730819ddba2dbde3c46ee36136575695b relating to a mistaken assumption about the old API. Attached please find two proposed patches. The first simplifies Emacs proper to just use the current timer_gettime/timer_settime API instead (this is the standard replacement for the obsolescent API). The second patch affects only the MS-Windows code, modifying it to use the new API instead of the old one; I haven't tested it as I don't use MS-Windows.