I added and delete some of the code.

I’m having problem with clock_gettime(CLOCK_MONOTONIC, &now) on my mac.
I’ll try it with detain in soon.