Fix the problem of excessive memory usage in traffic usage.

Add lightBlue theme color

Fix start unable to update profile issues
This commit is contained in:
chen08209
2024-06-16 19:04:33 +08:00
parent 90bb670442
commit fa67940ec9
23 changed files with 378 additions and 90 deletions

View File

@@ -188,6 +188,21 @@ func getTraffic() *C.char {
return C.CString(string(data))
}
//export getTotalTraffic
func getTotalTraffic() *C.char {
up, down := statistic.DefaultManager.Total()
traffic := map[string]int64{
"up": up,
"down": down,
}
data, err := json.Marshal(traffic)
if err != nil {
fmt.Println("Error:", err)
return C.CString("")
}
return C.CString(string(data))
}
//export asyncTestDelay
func asyncTestDelay(s *C.char, port C.longlong) {
i := int64(port)