@Override
			public void actionPerformed(ActionEvent e) {
				if (--paintCounter <= 0) {
					timer.stop();
					return;
				}

				if (skipFrameCount > 0) {
					skipFrameCount--;
					return;
				}
				if (++currentIconIndex >= iconList.size()) {
					currentIconIndex = 0;
					skipFrameCount = skipFrames;
				}
				if (component != null) {
					component.repaint();
				}
			}
best guess at how many timer invocations may happen before paint gets called
Ghidra/Framework/Docking/src/main/java/docking/util/AnimatedIcon.java