python - Pygame - Printing out seconds using Time -
this may simple, yet can't figure out way this; trying print seconds. use:
r = int(pygame.time.get_ticks) print(r/1000)
it prints out seconds want print out seconds once. output like: 11111112222222233333333..., when looking like: 1 2 3...
if can me out, id appreciate it. thank you.
you need track last value seconds, , print if new value seconds changes.
last_seconds = none while true: # run game r = int(pygame.time.get_ticks) seconds = r / 1000 if seconds != last_seconds: print(seconds) last_seconds = seconds
Comments
Post a Comment