in reply to Generate a unique ID

I think that is enough if you are sure that your program runs at least one "time unit" ... time => sleep (1), getimeofday => usleep (1)