using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class TimeIntervalUtil
{
public static int GetSubSeconds(DateTime startTimer, DateTime endTimer)
{
TimeSpan startSpan = new TimeSpan(startTimer.Ticks);
TimeSpan nowSpan = new TimeSpan(endTimer.Ticks);
TimeSpan subTimer = nowSpan.Subtract(startSpan).Duration();
return (int)subTimer.TotalSeconds;
}
public static int GetSubMinutes(DateTime startTimer, DateTime endTimer)
{
TimeSpan startSpan = new TimeSpan(startTimer.Ticks);
TimeSpan nowSpan = new TimeSpan(endTimer.Ticks);
TimeSpan subTimer = nowSpan.Subtract(startSpan).Duration();
return (int)subTimer.TotalMinutes;
}
}