[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Question about timing



I always forget brackets... maybe this is the time I learn to remember to use them.

Actually, I am using time.wait() for images displaying time interval: I just wrote the simple code I put in my message to see how much time it takes on my system to blit and update images. My final application is very simple indeed: the final image displayed on the screen is composed by joining different pieces of .jpg files, according to users' eye movement (events are collected similarly to mouse events, using a library called pylink). Since image refresh rate is very crucial for the good use of the application, I was looking for solutions which allows me to compute the optimal way to compose these final images, so I was curious to have a measure of how much time it takes for blit and update every image.

Actually, I'm using the Python time.time() function for calculating the time each operation takes, and pygame for displaying the images and collecting interface events.

Thank you very much for all of your explanations,

Francesco