util: add a timespec helper