session tcp: refactor pacer time

Type: refactor

Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 3bfc80e..e5faf3c 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -871,10 +871,7 @@
       return SESSION_TX_NO_DATA;
     }
 
-  ctx->snd_space = transport_connection_snd_space (ctx->tc,
-						   vm->clib_time.
-						   last_cpu_time,
-						   ctx->snd_mss);
+  ctx->snd_space = transport_connection_snd_space (ctx->tc, ctx->snd_mss);
 
   /* This flow queue is "empty" so it should be re-evaluated before
    * the ones that have data to send. */
@@ -892,9 +889,7 @@
 
   if (PREDICT_FALSE (!ctx->max_len_to_snd))
     {
-      transport_connection_tx_pacer_reset_bucket (ctx->tc,
-						  vm->clib_time.
-						  last_cpu_time);
+      transport_connection_tx_pacer_reset_bucket (ctx->tc);
       return SESSION_TX_NO_DATA;
     }
 
@@ -1257,6 +1252,7 @@
   SESSION_EVT (SESSION_EVT_DISPATCH_START, wrk);
 
   wrk->last_vlib_time = vlib_time_now (vm);
+  wrk->last_vlib_us_time = wrk->last_vlib_time * CLIB_US_TIME_FREQ;
 
   /*
    *  Update transport time