未验证 提交 1e9c089f 编写于 作者: O openharmony_ci 提交者: Gitee

!2775 Modify xts of process

Merge pull request !2775 from 史凯/master
......@@ -1323,9 +1323,13 @@ describe('ChildProcessTest', function () {
function sleep(d){
while(process.uptime() - result1 <= d);
}
sleep(5);
let result2 = process.uptime() - 6
expect(result1).assertEqual(result2)
sleep(6);
let result2 = process.uptime()
if ((result2 - result1) >= 6)
{
let flag = true
}
expect(flag).assertEqual(true)
})
/**
......@@ -1335,13 +1339,17 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it('testUptime002', 0, function () {
var result1 = process.uptime()
let result1 = process.uptime()
function sleep(d){
while(process.uptime() - result1 <= d);
}
sleep(8);
let result2 = process.uptime() - 9
expect(result1).assertEqual(result2)
let result2 = process.uptime()
if ((result2 - result1) >= 8)
{
let flag = true
}
expect(flag).assertEqual(true)
})
/**
......@@ -1356,8 +1364,12 @@ describe('ChildProcessTest', function () {
while(process.uptime() - result1 <= d);
}
sleep(10);
let result2 = process.uptime() - 11
expect(result1).assertEqual(result2)
let result2 = process.uptime()
if ((result2 - result1) >= 10)
{
let flag = true
}
expect(flag).assertEqual(true)
})
/**
......@@ -1372,8 +1384,12 @@ describe('ChildProcessTest', function () {
while(process.uptime() - result1 <= d);
}
sleep(7);
let result2 = process.uptime() - 8
expect(result1).assertEqual(result2)
let result2 = process.uptime()
if ((result2 - result1) >= 7)
{
let flag = true
}
expect(flag).assertEqual(true)
})
/**
......@@ -1383,13 +1399,17 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it('testUptime005', 0, function () {
var result1 = process.uptime()
let result1 = process.uptime()
function sleep(d){
while(process.uptime() - result1 <= d);
}
sleep(11);
var result2 = process.uptime() - 12
expect(result1).assertEqual(result2)
let result2 = process.uptime()
if ((result2 - result1) >= 11)
{
let flag = true
}
expect(flag).assertEqual(true)
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册