title: C++ equivalent to Python's time.time() in Linux?
body: <p>I have a Python program and a C++ program. They communicate via IPC.</p>
  
  <p>The Python will send a JSON {"event_time":time.time()} to C++ program.</p>
  
  <p>The C++ program will record this time, and insert the event into its own event queue according to the time sent via Python. I need operations such as comparison and subtraction of two time values from Python and c++.</p>
  
  <p>Python's time.time() is a simple double number that can be compared and sorted easily (e.g., it is something like 1428657539.065105).</p>
  
  <p>Is there anything equivalent in C++ to this value? They should at least agree to the number in accuracy of millisecond but not second? I.e., if I execute the two programs in the same time, they should get the same value in seconds and minor difference in the millisecond range.</p>
  
  <p>If not, then I have to fall back to use the YEAR, MONTH, DAY, HOUR, MIN, SEC, MILLISECOND strategy. The comparison, subtraction between two time values etc. will be harder than double comparison and double subtraction.</p>