Fixed cairo import
Pycairo get_data() works on windows but does not on linux
Using cairocffi module, the problem is solved.

(try,except clause is for compability, because I was unable to successfully install cairocffi on windows, so it will fall back to pycairo)
removed time import