Add tempo module

You should consider creating a separate file for these utils.