Organize code.
This commit is contained in:
@@ -12,6 +12,7 @@ const struct option opts[] =
|
||||
{ "verbose", required_argument, NULL, 'v' },
|
||||
{ "log-file", required_argument, NULL, 0 },
|
||||
{ "interface", required_argument, NULL, 'i' },
|
||||
{ "pin-maps", required_argument, NULL, 'p' },
|
||||
{ "update-time", required_argument, NULL, 'u' },
|
||||
{ "no-stats", required_argument, NULL, 'n' },
|
||||
{ "stats-ps", required_argument, NULL, 1 },
|
||||
@@ -31,7 +32,7 @@ void ParseCommandLine(cmdline_t *cmd, int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "c:ost:lhv:i:u:n:", opts, NULL)) != -1)
|
||||
while ((c = getopt_long(argc, argv, "c:ost:lhv:i:p:u:n:", opts, NULL)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@@ -80,6 +81,11 @@ void ParseCommandLine(cmdline_t *cmd, int argc, char *argv[])
|
||||
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
cmd->pin_maps = atoi(optarg);
|
||||
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
cmd->update_time = atoi(optarg);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ void PrintToolInfo()
|
||||
/**
|
||||
* Retrieves nanoseconds since system boot.
|
||||
*
|
||||
* @return The current nanoseconds since the system started.
|
||||
* @return The current nanoseconds since the system last booted.
|
||||
*/
|
||||
u64 GetBootNanoTime()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user