Skip to content

Commit

Permalink
Elapsed time option added also to yarpmanager-console
Browse files Browse the repository at this point in the history
  • Loading branch information
elandini84 committed Feb 11, 2025
1 parent 76ffdd7 commit 5ca69ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/yarpmanager-console/ymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Options:\n\
--silent Do not print the status messages (should be used with --application)\n\
--exit Immediately exit after executing the commands (should be used with --application)\n\
--from <conf> Configuration file name\n\
--elapsed_time if present the time stamp for log messages will be relative to the GUI start time\n\
--version Show current version\n\
--help Show help\n"

Expand Down Expand Up @@ -152,6 +153,13 @@ YConsoleManager::YConsoleManager(int argc, char* argv[]) : Manager()
return;
}

// I the option elapsed_time is not set, set the start time to 00:00:00 (For error and warning logging)
if(!config.check("elapsed_time"))
{
yarp::manager::ClockStart& clock = yarp::manager::ClockStart::getInstance();
clock.setStartTime("00:00:00");
}

/**
* preparing default options
*/
Expand Down

0 comments on commit 5ca69ce

Please sign in to comment.