code: def update(self, reset=True):
          
          if self.parent.info.dataset is not None:
              # read from the dataset, if available
              header = self.parent.info.dataset.header
              maximum = header['n_samples'] / header['s_freq']  # in s
              self.minimum = 0
              self.maximum = maximum
              self.start_time = self.parent.info.dataset.header['start_time']
  
          elif self.parent.notes.annot is not None:
              # read from annotations
              annot = self.parent.notes.annot
              self.minimum = annot.first_second
              self.maximum = annot.last_second
              self.start_time = annot.start_time
  
          # make it time-zone unaware
          self.start_time = self.start_time.replace(tzinfo=None)
  
          if reset:
              self.parent.value('window_start', 0)  # the only value that is reset
  
          self.display()
docs: Read full duration and update maximum.
  
          Parameters
          ----------
          reset: bool
              If True, current window start time is reset to 0.