1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 9 namespace Antmicro.Renode.Time 10 { 11 /// <summary> 12 /// Represents a time stamp information consisting of time interval and the domain. 13 /// </summary> 14 /// <remarks> 15 /// Time intervals from different time domains are not comparable. 16 /// </remarks> 17 public struct TimeStamp 18 { TimeStampAntmicro.Renode.Time.TimeStamp19 public TimeStamp(TimeInterval interval, ITimeDomain domain) 20 { 21 TimeElapsed = interval; 22 Domain = domain; 23 } 24 ToStringAntmicro.Renode.Time.TimeStamp25 public override string ToString() 26 { 27 return $"[Domain = {Domain}, TimeElapsed = {TimeElapsed}]"; 28 } 29 30 public TimeInterval TimeElapsed { get; private set; } 31 public ITimeDomain Domain { get; private set; } 32 } 33 } 34