use setitimer function rather than syscall to implement alarm