📜  从时间 secs 和 nsecs 获取 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:29.455000             🧑  作者: Mango

代码示例1
t = rospy.Time.from_sec(time.time())
   seconds = t.to_sec() #floating point
   nanoseconds = t.to_nsec()
   
   d = rospy.Duration.from_sec(60.1)  # One minute and one tenth of a second
   seconds = d.to_sec() #floating point
   nanoseconds = d.to_nsec()