vppinfra: refactor clib_timebase_t
Add a clib_time_t * argument to clib_timebase_init(...), to encourage client code to share the vlib_main_t's clib_time_t object. Display the current day / date in GMT via the "show time" debug CLI. Fix the test framework so it processes the new "show time" output format. Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I5e52d57eb164b7cdb6355362d520df6928491711
This commit is contained in:

committed by
Florin Coras

parent
7a91b0e264
commit
197180031b
@ -758,7 +758,12 @@ class VppTestCase(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
def get_vpp_time(cls):
|
||||
return float(cls.vapi.cli('show clock').replace("Time now ", ""))
|
||||
# processes e.g. "Time now 2.190522, Wed, 11 Mar 2020 17:29:54 GMT"
|
||||
# returns float("2.190522")
|
||||
timestr = cls.vapi.cli('show clock')
|
||||
head, sep, tail = timestr.partition(',')
|
||||
head, sep, tail = head.partition('Time now')
|
||||
return float(tail)
|
||||
|
||||
@classmethod
|
||||
def sleep_on_vpp_time(cls, sec):
|
||||
|
Reference in New Issue
Block a user