Use rospy's time routines & module instead of python's time.time:
http://wiki.ros.org/rospy/Overview/Time