diff options
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r-- | lib/dpif-netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c20f875ee..3240f5f76 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -5549,7 +5549,7 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, memset(exceeded_rate, 0, cnt * sizeof *exceeded_rate); /* All packets will hit the meter at the same time. */ - long_delta_t = (now - meter->used) / 1000; /* msec */ + long_delta_t = now / 1000 - meter->used / 1000; /* msec */ /* Make sure delta_t will not be too large, so that bucket will not * wrap around below. */ |