PingData.cs 546 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace KairoEngine.Multiplayer
  5. {
  6. [System.Serializable]
  7. public class PingData
  8. {
  9. public int clientId = -1;
  10. public int pingId = -1;
  11. public float startTime = 0f;
  12. public float endTime = 0f;
  13. public int elapsedTime() => Mathf.RoundToInt((endTime - startTime) * 1000);
  14. public PingData(int clientId, int pingId)
  15. {
  16. this.clientId = clientId;
  17. this.pingId = pingId;
  18. }
  19. }
  20. }