Ask Your Question

Get the current time

asked 2015-10-21 03:57:59 -0500

commandos23 gravatar image

How can I get current time in ros, because I want to have two dimensional array, one dimension would be int, another current time, and I want to have function and loop which will go through array, and keep one int value for some exact period of time, for ex. 60sec number will be 100, then next 80sec number will be 80 etc. p.s. sorry for bad tags

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-21 05:24:25 -0500

gvdhoorn gravatar image

From wiki/roscpp/Overview/Time - Getting the Current Time:


Get the current time as a ros::Time instance:

ros::Time begin = ros::Time::now();

via Google: "ros get current time"

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-10-21 03:57:59 -0500

Seen: 2,662 times

Last updated: Oct 21 '15