Skip to content

Commit

Permalink
#917: Allow -e alloc,cpu,lock syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
apangin committed Apr 18, 2024
1 parent 005f7a3 commit 059cf13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ Error Arguments::parse(const char* args) {
CASE("wall")
_wall = value == NULL ? 0 : parseUnits(value, NANOS);

CASE("cpu")
if (_event != NULL) {
msg = "Duplicate event argument";
} else {
_event = EVENT_CPU;
}

CASE("interval")
if (value == NULL || (_interval = parseUnits(value, UNIVERSAL)) <= 0) {
msg = "Invalid interval";
Expand Down

0 comments on commit 059cf13

Please sign in to comment.