I figured out the issue,
Issue: Main thread was getting interrupted by a signal instead of child thread consisting clock_nanosleep.
Solution 1: Block SIGUSR1 in main thread using "pthread_sigmask(SIG_BLOCK, &blocked, NULL)"
Solution 2: Generate thread specific events using "sigev_notify = SIGEV_THREAD_ID". (Works for timers)
Thanks