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: LiteOS2021 <dinglu@huawei.com>
This commit is contained in:
LiteOS2021 2022-02-22 17:50:58 +08:00
parent 9a3745384a
commit 5c982f1087
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}