title: How to create an auto-refreshing variable in Ember?
body: <p>I am still rather new to Ember and I am stuck on an idea that I would like to get done.  I could do this in JQuery/Javascript, but I want to use some of the Ember features to get this properly done.</p>
  
  <p>I am trying to create a live stock ticker, that would simply auto-refresh every few seconds with a value +50, -100, +1512, -25, etc.</p>
  
  <p>I am mostly just stuck on how to get a variable that auto-refreshes per the allotted amount of time.  Should I create a custom component?</p>
  
  <p>Any tips would be appreciated, thanks</p>
  
  <p>UPDATE:</p>
  
  <pre><code>&lt;span class="pull-right"&gt;Ember Stock Market: {{emberStock}} &lt;/span&gt;
  
  App.ApplicationController = Ember.Controller.extend({   
      emberStock: '0'
  });
  
  App.ApplicationRoute = Ember.Route.extend({
      setupController: function(controller){
              this.stockTicker(controller);
      },
      stockTicker: function(controller){
          var self = this;
          var price = Math.floor(Math.random() * 50) - 1;
  
          controller.set('emberStock', price);
  
          Em.run.later(function(){
              self.stockTicker(controller);
          }, 1000);
      }
  });
  </code></pre>