将V2X模块合并进来,合并节点为byd 1ba42f686d6188f3747ecf50c4b0af49982508c0

This commit is contained in:
董宏宇
2020-07-17 18:02:38 +08:00
parent e172f930b8
commit 9009f713a1
383 changed files with 24174 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
package com.mogo.module.blackbox;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -0,0 +1,20 @@
package com.mogo.module.blackbox;
import com.mogo.module.v2x.utils.TimeConstants;
import com.mogo.module.v2x.utils.TimeUtils;
import org.junit.Test;
public class TimeUtilsTest {
@Test
public void getTimeSpan() {
// 获取 ACC ON 时间
String accOnTime = "2020-06-08 14:44:04";
// 获取 ACC OFF 时间
String accOFFTime = "2020-06-08 14:40:49";
// 比较开关机时间如果acc of 比 acc on 时间还要靠近说明acc on 时间记录有问题,需要更新同步
long timeSpan = TimeUtils.getTimeSpan(accOnTime, accOFFTime, TimeConstants.MIN);
System.out.println("开关机时间间隔:" + timeSpan);
}
}