public SimTime() { new Thread(() => { while (!ROS.isStarted() && !ROS.shutting_down) { Thread.Sleep(100); } Thread.Sleep(1000); if (!ROS.shutting_down) { nh = new NodeHandle(); simTimeSubscriber = nh.subscribe <Messages.rosgraph_msgs.Clock>("/clock", 1, SimTimeCallback); } ROS.waitForShutdown(); simTimeSubscriber.shutdown(); }).Start(); }