summaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon/perfmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/perfmon/perfmon.c')
-rw-r--r--src/plugins/perfmon/perfmon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/perfmon/perfmon.c b/src/plugins/perfmon/perfmon.c
index 07a4ae61859..7a69d454fd0 100644
--- a/src/plugins/perfmon/perfmon.c
+++ b/src/plugins/perfmon/perfmon.c
@@ -238,6 +238,7 @@ perfmon_start (vlib_main_t *vm)
vlib_node_set_dispatch_wrapper (vlib_mains[i],
perfmon_dispatch_wrapper);
}
+ pm->sample_time = vlib_time_now (vm);
pm->is_running = 1;
return 0;
}
@@ -268,6 +269,7 @@ perfmon_stop (vlib_main_t *vm)
}
pm->is_running = 0;
+ pm->sample_time = vlib_time_now (vm) - pm->sample_time;
return 0;
}