code: def _graphql_query_waittime(self, query_hash: str, current_time: float, untracked_queries: bool = False) -> int:
          
          sliding_window = 660
          if query_hash not in self._graphql_query_timestamps:
              self._graphql_query_timestamps[query_hash] = []
          self._graphql_query_timestamps[query_hash] = list(filter(lambda t: t > current_time - 60 * 60,
                                                                   self._graphql_query_timestamps[query_hash]))
          reqs_in_sliding_window = list(filter(lambda t: t > current_time - sliding_window,
                                               self._graphql_query_timestamps[query_hash]))
          count_per_sliding_window = self._graphql_request_count_per_sliding_window(query_hash)
          if len(reqs_in_sliding_window) < count_per_sliding_window and not untracked_queries:
              return max(0, self._graphql_earliest_next_request_time - current_time)
          next_request_time = min(reqs_in_sliding_window) + sliding_window + 6
          if untracked_queries:
              self._graphql_earliest_next_request_time = next_request_time
          return round(max(next_request_time, self._graphql_earliest_next_request_time) - current_time)
docs: Calculate time needed to wait before GraphQL query can be executed.