time() returns the the seconds since the epoch, in UTC, as a floating point number on all platforms. On Unix time. clock() measures the amount of CPU time that has been used by the current process, so it's no good for measuring elapsed time from some point in the past.