title: Tracking an App's running time iOS
body: <p>Is there a way that I can know how long the apps in the foreground has been running? I have three possible solutions in mind:</p>
  
  <p>I. use battery consumption and battery consumption rate (iOS 8 and later tell you the battery usage of the app, but the batter consumption will be difficult to handle)</p>
  
  <p>II. use system processes monitor</p>
  
  <p>III. use Apple's diagnostics logs. This approach is quite "backdoor." Plus I am not sure if Apple allows us to use the information or not.</p>
  
  <p>Can someone tell me if any of the above solution is realistic? If not, I want to know is it possible to find out the duration of a running app on iOS at all?</p>