I need a function or way to get the UNIX epoch in seconds, much like how I can in PHP using the time function.
I can't find any method except the time() in ctime which seems to only output a formatted date, or the clock() function which has seconds but seems to always be a multiple of 1 million, nothing with any resolution.
I wish to measure execution time in a program, I just wanted to calculate the diff between start and end; how would a C++ programmer do this?
EDIT: time() and difftime only allow resolution by seconds, not ms or anything too btw.