using System;
using Cute;

public static class NetworkUtility
{
	public static int GetTimeSpanSecond(long oldTimer)
	{
		if (oldTimer == 0L)
		{
			return 0;
		}
		long ticks = TimeUtil.GetAbsoluteTime().Ticks - oldTimer;
		return (int)new TimeSpan(ticks).TotalSeconds;
	}

	public static float GetTimeSpanMilliSecond(long oldTimer)
	{
		if (oldTimer == 0L)
		{
			return 0f;
		}
		long ticks = DateTime.Now.Ticks - oldTimer;
		return (float)new TimeSpan(ticks).TotalSeconds;
	}
}
