暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MessageForRetryRepeat.cs 951B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Diagnostics;
  3. namespace UnityEngine.TestRunner.TestProtocol
  4. {
  5. [Serializable]
  6. internal class MessageForRetryRepeat
  7. {
  8. public string type;
  9. // Milliseconds since unix epoch
  10. public ulong time;
  11. public int version;
  12. public string phase;
  13. public int processId;
  14. public MessageForRetryRepeat()
  15. {
  16. type = "TestStatus";
  17. version = 2;
  18. phase = "Immediate";
  19. processId = Process.GetCurrentProcess().Id;
  20. AddTimeStamp();
  21. }
  22. public void AddTimeStamp()
  23. {
  24. time = Convert.ToUInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds);
  25. }
  26. internal const string UtpPrefix = "\n##utp:";
  27. public override string ToString()
  28. {
  29. var msgJson = JsonUtility.ToJson(this);
  30. return $"{UtpPrefix}{msgJson}";
  31. }
  32. }
  33. }