xutils: Add common code to set up struct itimerval interval and value

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>