title: iOS Game Center submit time elapsed
body: <p>I'm trying to submit a double with the time that the user took to beat a stage. The leaderboard score format type is "Elapsed time - To the hundredth of a second". Something like this:</p>
  
  <p>0:11:44.09</p>
  
  <p>So I have a double that says the time is 11.734929 (it's 0:11:73). I multiply it to 6000 to convert it to int64_t. The result is 70409.572494. I can only send and int64_t so I'm losing  0.572494 seconds. The time sent is finally 0:11:44.09.</p>
  
  <p>How can I send the full time instead of part of it?</p>
  
  <p>EDIT:</p>
  
  <p>I found the solution:</p>
  
  <pre><code>double my_time = ...
  
  double intPart = 0;
  double fractPart = modf(my_time, &amp;intPart);
  int isecs = (int)intPart;
  int min = isecs / 60;
  int sec = isecs % 60;
  int hund = (int) (fractPart * 100);
  
  int64_t time_to_send_through_game_center = min*6000 + (sec*100 + hund);
  </code></pre>