title: Compare future date with current date SwiftUI
body: <p>I have the following:</p>
  
  <pre><code>struct ContentView: View {
  var body: some View {
      VStack{
          Button(action: {
              let soon = Date().addingTimeInterval(100)
  
              if(soon == Date()) {
                  print("Time is up!")
              }
          }) {
              Text("Alert")
          }
      }
  }
  }
  </code></pre>
  
  <p>I'm trying to add some time to soon and then when the current time is == to soon, then execute the print, how can I do that?</p>
  
  <p>What I want is: I have current time, then I add some seconds to that time and when that time is up do something, I need Date() because I'll be working with specific times, for example, if it's 10am, I want to add 3 min, then when it's 10:03am display alert.</p>