         
         
         //        while(self.condic){
-        sleep(50)
+        sleep(2)
         
         var request = requestAuth.getRequest("https://api.github.com/notifications", username: "gutti95", pw: "gustgt12")
         

        
        if httpResponse.statusCode == 200 {
            let dataArr = NSJSONSerialization.JSONObjectWithData(urlData!, options: NSJSONReadingOptions.MutableContainers, error: &try) as! Array<NSDictionary>
            //                var idAnterior: String = id as! String
            
            let repo = dataArr[0]["repository"] as! NSDictionary
            let subject = dataArr[0]["subject"] as! NSDictionary
            
            firstTime = false
            
            repositorio = repo["name"] as! String
            title = subject["title"] as! String
            
            
            var localNotification = UILocalNotification()
            localNotification.fireDate = NSDate(timeIntervalSinceNow: 5)
            localNotification.alertBody = "Você tem notificações em \(repositorio), com o assunto \(title)"
            localNotification.timeZone = NSTimeZone.defaultTimeZone()
            localNotification.applicationIconBadgeNumber = UIApplication.sharedApplication().applicationIconBadgeNumber + 1
            
            UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
            
            
        }
        //
        //        }

class AppDelegate: UIResponder, UIApplicationDelegate {
    
    var window: UIWindow?
    var idAnterior: String = ""
    var firstTime = true
    
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
