title: Chrono Timer Not Converting Seconds Properly
body: <p>I am having an interesting, yet strange issue with my game timer. It seems like the milliseconds works just fine. However, when I try to apply the <code>std::chrono::seconds</code> cast I suddenly get <code>0.000000</code> when casting to a float.</p>
  
  <p>My timer is as follows:</p>
  
  <pre><code> #include &lt;iostream&gt;
   #include &lt;time.h&gt;
   #include &lt;chrono&gt;
  
  
   class Timer
   {
   public:
  
       typedef std::chrono::high_resolution_clock Time;
       typedef std::chrono::milliseconds ms; //&lt;--If changed to seconds, I get 0.00000
       typedef std::chrono::duration&lt;float&gt; fsec;
  
       std::chrono::high_resolution_clock::time_point m_timestamp;
  
       float currentElapsed;
  
       Timer()
       {
            m_timestamp = Time::now();
       }
  
       float getTimeElapsed()
       {
           return currentElapsed;
       }
  
       void Tick()
       {
           currentElapsed = std::chrono::duration_cast&lt;ms&gt;(Time::now() - m_timestamp).count();
           m_timestamp = Time::now();
       }
  
   public:
       //Singleton stuff
       static Timer* Instance();
       static void Create();
   };
  </code></pre>
  
  <p>The timer gets ticked <strong>once</strong> per frame. So, for instance I normally get about 33ms per frame. <code>33ms / 1000 = 0.033s</code> seconds so there should be plenty of bit space to hold that.</p>
  
  <p>Any ideas on what maybe going on?</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>EDIT: Sorry, Seconds, not Milliseconds</p>