testing processing 1

a quick timing test of processing. It measures the latency between two draw cycles for different frameRates. The test shows on all computers that we used that millis() seems to measure not continuously, but in steps of 10-15 ms, depending on the computer. In other words: every time measured with millis() will be rounded up or down to the nearest 10 or 15 ms.

Note: download the processing code and run in the processing environment on your computer to see the full output. The output to the screen may be cut of.

on my machine (old ibm thinkpad running win xp), the output looks like this – you clearly see the jumps of 10 ms irrespective of the frameRate

Rate was 60
0 337x
10 641x
11 9x
20 9x
21 1x
30 2x
60 1x
——————————————–
Rate was 100
0 12x
10 955x
11 15x
——————————————–
Rate was 200
0 446x
10 542x
11 8x
20 4x
——————————————–
Rate was 500
0 779x
10 203x
11 2x
20 7x
30 3x
40 4x
50 2x
——————————————–
Rate was 1000
0 848x
10 147x
11 3x
20 2x
——————————————–

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s