title: System clock on embedded
body: <p>I'm developing a project, where I need to support a calender + clock with ms granularity.
  I managed to configure the RTC of the chip to aid me with time keeping, but I'm having difficulty finding the correct data type to present the time.</p>
  
  <p>I always worked with <code>time_t</code> (The Unix epoch), however it is seconds based, so it's not going to work.
  What about <code>struct timeval</code> ? it appears that this structure is not supported as the <code>struct tm</code> in the context of presentation (asctime).</p>
  
  <p>What is the preferred way to represent the time in an embedded system ?</p>
  
  <p>note: This system interfaces a java based back-end server and needs to synchronize the time with it, so I'm looking for a structure that could be used out of the box in several languages.</p>