Difference between timestamp stored and current date
I have linked up an app that I have made to an Firebase database. The app sends Firebase the time as a timeIntervalSinceReferenceDate when a button is pressed. An example of the value is - 498898978852.928 . I want this number to distinguish wether the user has pressed that same button more less than 48 hours ago. Is there a way to measure the time period of 48 hours or should I use a different method? I am using swift 2 and Xcode 7! Swift 3. If you are using Swift 2, use NSDate //the first button press, this is a double but assume it's a timeInterval let firstPress = 498898978.928 let date =