code: def isRunning(self, waitTime=0):
          
          waitUntil = time.time() + waitTime
          while True:
              if self.getPID() > 0:
                  return True
              else:
                  self._pid = PlatformManager.getWindowPID(PlatformManager.getWindowByTitle(re.escape(self._title)))
  
              # Check if we've waited long enough
              if time.time() > waitUntil:
                  break
              else:
                  time.sleep(self._defaultScanRate)
          return self.getPID() > 0
docs: If PID isn't set yet, checks if there is a window with the specified title.