<clock id="tabs_clock" class="rowc">

  <div class="text pointer" onclick={opts.ontime} >
    <strong>{date}</strong>
    <span>{time}</span>
  </div>

  <script>

    this.fetch_time = ()=>{
      let now = moment()
      this.date = now.format('ddd, MMM Do, YYYY')
      this.time = now.format('h:mm A')
      if(this.running){
        let time = moment.duration(now.valueOf(0) - this.running.start, 'milliseconds').format('hh:mm:ss', {forceLength: true, trim: false})
        this.stopwatch = time
      }else{
        this.stopwatch = '00:00:00'
      }
      this.update();
    }
    this.fetch_time()
    setInterval(this.fetch_time, 1000)

  
  </script>

  <style>
    :scope{
    
    }
  </style>
</clock>
