Let user specify the start-time of the program#496
Open
Conversation
edwardalee
requested changes
Dec 8, 2024
Contributor
edwardalee
left a comment
There was a problem hiding this comment.
This looks very useful, but there are two issues:
- The start time is not a duration, so the usage message and variable names should be updated. It's an absolute start time.
- It would be useful to have some hints about how to specify a start time. It requires units, but on a POSIX machine, it will be specifying the number of nanoseconds since Jan. 1, 1970. Maybe there is a utility function that will tell me what, say, 2PM today is in seconds?
Collaborator
Author
|
Thanks for your feedback Edward! I have done a couple of changes:
-s, --start-time <time-point> <units>
The logical start time of the program, expressed as an absolute time point
which is the duration since the epoch of the underlying system clock.
The units are nsec, usec, msec, sec, minute, hour, day, week or the plurals of those.
On linux, to compute a start time of 2 minutes into the future, expressed in seconds, you can do:.
`date -d "2 minutes" +%s`.
|
27fd6bd to
dd0b3ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new command line argument
-s --start-timethat allows the user to specify the start time of the program. This currently only works for non-federated programs. In a federated setting the program will then wait until the specified start time (if it is in the future) before reaching out to the RTI and negotiating a start time.Currently there are no tests for this feature, but I have tested it on my end.