title: C++: How would I get unix time?
body: <p>I need a function or way to get the UNIX epoch in seconds, much like how I can in PHP using the time function.</p>
  
  <p>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. </p>
  
  <p>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? </p>
  
  <p>EDIT: time() and difftime only allow resolution by seconds, not ms or anything too btw.</p>