You can time code in ipython using the %time and %timeit magics. You can also time sections of code using system clock, for example
import numpy as np
import time
init_time = time.clock() # start clock
x = np.linspace(0,100,1000000)
y = np.sqrt(x)
elap_time = time.clock() - init_time # finds difference
print "Time elapsed is %0.3f ms" % (elap_time*1000) # converts to ms