Functions on manuplating timespec