Fix clock_gettime handling
Fix some format string warnings