title: Quickblox User online status IOS
body: <p>I have been using quickblox sdk for IOS and i have one query regarding user's online status.</p>
  
  <p>Below is the code which is recommended.</p>
  
  <pre><code>QBUUser *user = ...;
  
  NSInteger currentTimeInterval = [[NSDate date] timeIntervalSince1970];
  NSInteger userLastRequestAtTimeInterval   = [[user lastRequestAt] timeIntervalSince1970];
  
  // if user didn't do anything last 1 minute (60 seconds)    
  if((currentTimeInterval - userLastRequestAtTimeInterval) &gt; 60)
  { 
   // user is offline now
  }
  </code></pre>
  
  <p>But my query is that do i need to check this in a timer event because every 5-10 seconds i would want to know if user is online or there is any other better approach?</p>