title: How do I check how many seconds since the chatbot is open?
body: <p>My html code like this :</p>
  
  <pre><code>&lt;div class="chatbot chatbot--closed "&gt;
    &lt;div class="chatbot__header"&gt;
      &lt;p&gt;&lt;strong&gt;Got a question?&lt;/strong&gt; &lt;span class="u-text-highlight"&gt;Ask Harry&lt;/span&gt;&lt;/p&gt;
      &lt;svg class="chatbot__close-button icon-speech" viewBox="0 0 32 32"&gt;
        &lt;use xlink:href="#icon-speech" /&gt;
      &lt;/svg&gt;
      &lt;svg class="chatbot__close-button icon-close" viewBox="0 0 32 32"&gt;
        &lt;use xlink:href="#icon-close"  data-toggle="modal" data-target="#basicModal" /&gt;
      &lt;/svg&gt;
    &lt;/div&gt;
    &lt;div class="chatbot__message-window"&gt;
      &lt;ul class="chatbot__messages"&gt;
        &lt;li class="is-ai animation"&gt;
          &lt;div class="is-ai__profile-picture"&gt;
            &lt;svg class="icon-avatar" viewBox="0 0 32 32"&gt;
              &lt;use xlink:href="#avatar" /&gt;
            &lt;/svg&gt;
          &lt;/div&gt;
          &lt;span class="chatbot__arrow chatbot__arrow--left"&gt;&lt;/span&gt;
          &lt;p class='chatbot__message'&gt;&lt;strong class='intro'&gt;Hello, I’m Harry, your virtual assistant. I'm here to help with your general enquiries.&lt;/strong&gt;Example of questions you can ask for demo purpose: &lt;br&gt;&lt;em&gt;Hi / How are you? / I'd like some financial advice / Can you email me a statement? / Can I get a form? /  How do I cancel my life insurance? &lt;/em&gt;&lt;/p&gt;
        &lt;/li&gt;
        &lt;!-- Message here --&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div class="chatbot__entry chatbot--closed"&gt;
      &lt;input type="text" class="chatbot__input" placeholder="Write a message..." /&gt;
      &lt;svg class="chatbot__submit" viewBox="0 0 32 32"&gt;
        &lt;use xlink:href="#icon-send" /&gt;
      &lt;/svg&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Demo and full code like this : <a href="https://codepen.io/trendingnews/pen/wvBorrR?editors=1010" rel="nofollow noreferrer">https://codepen.io/trendingnews/pen/wvBorrR?editors=1010</a></p>
  
  <p>When the user clicks close on the chatbot, it will appear a feedback modal to fill the user experience using chatbot. I want this feedback modal to appear when the chatbot has been open for about 30 seconds. So if the chatbot has been open for more than 30 seconds and the user clicks close, modal feedback appears. But if the chatbot hasn't been open for 30 seconds, the user clicks close to chatbot, the modal doesn't appear</p>
  
  <p>How can I do it?</p>