title: What is the proper way to get the count of ticks of a duration in C++1x
body: <p>I'm using C++ to develop my project and I used <code>std::chrono</code>.</p>
  <p>I need to get a count of ticks of some duration, for example, I may need an integer <code>3600</code>, which represents the count of second-ticks of one hour.</p>
  <p>To get this integer, I can code as below:</p>
  <pre><code>int a = 3600; // 1 hour = 3600 sec
  int b = std::chrono::duration_cast&lt;std::chrono::seconds&gt;(1h).count();
  int c = (1h + 0s).count();
  </code></pre>
  <p>Obviously, each of these can give me a <code>3600</code>. The first one is quite simple but I'd better add some comment to avoid the magic number <code>3600</code>. The second one is quite clear but may I say it's really really too long? And the third one is not long, and <code>+ 0s</code> could convert <code>1h</code> into <code>std::chrono::seconds</code> automatically so I can get what I want, but is it kind of tricky?</p>
  <p>So could you please tell me which one is the best in the view of the modern C++ or is there any better code than mine?</p>