Does anyone now how to loop something?

You are viewing a single comment. View All
Answered by ArchieMaclean (899) [earned 5 cycles]
View Answer

Ok umm also is there a way to use Time.Sleep(1) but with a decimal as an time interval? For example: Time.Sleep(1.65) It would be super useful.

Geocube101 (614)

@MATTHEWBECHTEL It should work just as you typed it. Is it not working?

If not, try a lowercase 'T': time.sleep(value)


No it is, but I’m just wondering if decimals work in time.sleep @Geocube101 like time.sleep(.89)

ArchieMaclean (899)

@MATTHEWBECHTEL I think decimals work. Try it and see! If not,

import pygame
pygame.time.wait(10) # waits 10 ms

may work (not sure if it works on just python repls though)


Yes, I just realized that they work! Thank you. @ArchieMaclean