def print_time(event): uptime = Duration() uptime.data = event.current_real - start_time rospy.logdebug("Runtime has reached: " + str(int(uptime.data.secs / 60)) + " minutes.")
def publish_time(event): uptime = Duration() uptime.data = event.current_real - start_time pub_uptime.publish(uptime)