code: public void printLine(long periodMS) {
          long currentTime = GVRTime.getMilliTime();
  
          if (mLastPrintTimeMS < 0) {
              mLastPrintTimeMS = currentTime;
              return;
          }
  
          if (currentTime - mLastPrintTimeMS >= periodMS) {
              mLastPrintTimeMS = currentTime;
              printLine();
          }
      }
docs: Log a line with a specified frequency. If the method is invoked before
  {@code periodMS} millisecond has passed since last printing, the new line
  is suppressed. The {@code periodMS} can be set to 0 to print every line.
  
  @param periodMS The log period in milliseconds.