Updated thread.c

Made the changes required for the alarm clock assignment .