The time() function is what you need.