@Rohita83 - the use of ros2_time was done over a year ago when there wasn’t a solid solution for time. You should update the package to not require ros2_time and use some other method (I’m not sure what the best way is currently) which may be the rclcpp time. Also, it may be best to move questions like this to a different channel (github issues perhaps?) so we don’t spam this thread.
You may want to coordinate your work with Persistent Systems (see the post here: Diagnostic-aggregator and diagnostic-updater porting to ROS2) a they are also working on porting this package.