!606 【liteos_m】修复testTimes测试

Merge pull request !606 from LiteOS/master
This commit is contained in:
openharmony_ci 2022-02-22 10:21:55 +00:00 committed by Gitee
commit fe4db41b7c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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) LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimes, Function | MediumTest | Level1)
{ {
const int testClockt = 100; const int testClockt = LOSCFG_BASE_CORE_TICK_PER_SECOND;
const int msPerClock = 10; const int msPerClock = OS_SYS_MS_PER_SECOND / LOSCFG_BASE_CORE_TICK_PER_SECOND;
struct tms start = { 0 }; struct tms start = { 0 };
struct tms end = { 0 }; struct tms end = { 0 };
clock_t stTime = times(&start); clock_t stTime = times(&start);
@ -562,6 +562,6 @@ void PosixTimeFuncTest()
RUN_ONE_TESTCASE(testTimeStrftime001); RUN_ONE_TESTCASE(testTimeStrftime001);
RUN_ONE_TESTCASE(testTimeStrftime002); RUN_ONE_TESTCASE(testTimeStrftime002);
RUN_ONE_TESTCASE(testTimeStrftime003); RUN_ONE_TESTCASE(testTimeStrftime003);
RUN_ONE_TESTCASE(testTimes);
return; return;
} }