From 79af1ee44dbd8a8b16ebe54de8f861bd9fddb7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=B7=A5?= Date: Wed, 27 Apr 2022 14:30:59 +0800 Subject: [PATCH] Solved #21 #19 #4 --- serial/testport.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serial/testport.go b/serial/testport.go index b98643a..7d07ecf 100644 --- a/serial/testport.go +++ b/serial/testport.go @@ -17,10 +17,13 @@ type testPort struct { createdTime time.Time } +var BoardSysTime time.Time = time.Now() // 虚拟电路板的系统时间 + func newTestPort() serial.Port { + log.Println(BoardSysTime) return &testPort{ readingAddresses: []uint32{}, - createdTime: time.Now(), + createdTime: BoardSysTime, } }