Use the ros-time function with no arguments. This will use the wall time if the /use_sim_time parameter is false, and the most recent value of the clock topic otherwise.

A useful macro is loop-at-most-every :

(loop-at-most-every 0.1
  (publish image-pub (most-recent-image)))

Wiki: roslisp/Overview/Time (last edited 2010-07-08 22:26:26 by BhaskaraMarthi)