title: Store timestamps in nanoseconds c++
body: <p>My goal is to store timestamps in the range of nanoseconds. Let's say that I have two machines that needs to communicate, at precisely what time a task is done. </p>
  
  <p>Let's just for the sake of the question, say that they a synchronized clocks.<br>
  Machine A stores its local time when it's done. Machine B transmits to A, at which time it is done. Machine A then calculates the difference. </p>
  
  <p>My problem is, that the timedifference can actually be up to 60 seconds, but also down to .25ms. So I need to store the time in such a manner, that I can handle both, and calculate the timedifference. </p>
  
  <p>Since time since epoch in nanoseconds is such a big number, I don't think I can store that in any variable that I know of. </p>
  
  <p>How would you tackle this situation? My current though is, that I probably (somehow) could scale the time since epoch in ns down to the bits representing 1 minute, though I have no idea how to do that.</p>
  
  <p>Hope you can help.</p>
  
  <p>Best regards</p>