コード例 #1
0
ファイル: Clock.cs プロジェクト: ErtyHackward/utopia
 /// <summary>
 /// Converts real time span to game time span
 /// </summary>
 /// <param name="realTimeSpan"></param>
 /// <returns></returns>
 public UtopiaTimeSpan RealToGameSpan(TimeSpan realTimeSpan)
 {
     return(UtopiaTimeSpan.FromSeconds(realTimeSpan.TotalSeconds * _timeFactor));
 }
コード例 #2
0
ファイル: UtopiaTime.cs プロジェクト: ErtyHackward/utopia
 public static UtopiaTimeSpan operator -(UtopiaTime t1, UtopiaTime t2)
 {
     return UtopiaTimeSpan.FromSeconds(t1.TotalSeconds - t2.TotalSeconds);
 }