提交 5c982f10 编写于 作者: L LiteOS2021

fix(time_func_test_01.c): 修复testTimes测试单板配置LOSCFG_BASE_CORE_TICK_PER_SECOND = 1000的问题

修复testTimes测试单板配置LOSCFG_BASE_CORE_TICK_PER_SECOND = 1000的问题
Signed-off-by: NLiteOS2021 <dinglu@huawei.com>
上级 9a374538
......@@ -516,8 +516,8 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeStrftime003, Function | MediumTes
*/
LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimes, Function | MediumTest | Level1)
{
const int testClockt = 100;
const int msPerClock = 10;
const int testClockt = LOSCFG_BASE_CORE_TICK_PER_SECOND;
const int msPerClock = OS_SYS_MS_PER_SECOND / LOSCFG_BASE_CORE_TICK_PER_SECOND;
struct tms start = { 0 };
struct tms end = { 0 };
clock_t stTime = times(&start);
......@@ -562,6 +562,6 @@ void PosixTimeFuncTest()
RUN_ONE_TESTCASE(testTimeStrftime001);
RUN_ONE_TESTCASE(testTimeStrftime002);
RUN_ONE_TESTCASE(testTimeStrftime003);
RUN_ONE_TESTCASE(testTimes);
return;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册