Next page | Contents page |

Exercise 8 - how long?

Using your program from exercise 7, find out how long the draw() function takes. Do it several times because in a multi-tasking system the result will vary.

If the time taken is less than 1ms you may see 0 reported, because the time resolution of new Date() is only to the nearest millisecond. You may like to read about possibly finer resolution on MDN

Next page | Contents page |