You might use POSIX timefmt() and you get easy to maintain numbers, but simply take the two number you have and calculate the diff then use the timefmt() and you get the difference in a nice format, but don't forget to read the man for posix timefmt() :-)) Have a nice day All decision is left to your taste Update whoops, seems I've mixed it up.