common: C++ RateKeeper (#29374)

* c++ RateKeeper

* add to files_common

* use util::random_int

* improve monotor_time

* remove ~ratekeeper
old-commit-hash: 3eef63af9b
This commit is contained in:
Dean Lee
2023-08-21 12:27:02 +08:00
committed by GitHub
parent bd27be2b78
commit 97631ec362
10 changed files with 97 additions and 23 deletions
+2
View File
@@ -12,6 +12,7 @@ common_libs = [
'util.cc',
'i2c.cc',
'watchdog.cc',
'ratekeeper.cc'
]
if arch != "Darwin":
@@ -29,6 +30,7 @@ Export('_common', '_gpucommon')
if GetOption('test'):
env.Program('tests/test_util', ['tests/test_util.cc'], LIBS=[_common])
env.Program('tests/test_swaglog', ['tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread'])
env.Program('tests/test_ratekeeper', ['tests/test_ratekeeper.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread'])
# Cython
envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])