Implemented asynchronous alarm using POSIX threads