/// <summary>
/// Initializes a new instance of the
/// <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.SubmissionTimePolicy"/> class.
/// </summary>
/// <param name="WaitInterval">Wait interval.</param>
public SubmissionTimePolicy (long WaitInterval)
{
this.WaitInterval = WaitInterval;
//retrieve the last submitted timestamp from the cache
_persistStore = new PlayerPreferenceKVStore();
String TimeStamp = _persistStore.Get(LAST_SUCCESSFUL_DELIVERY_TIME_STAMP_KEY);
if(TimeStamp != null && TimeStamp.Length > 0)
{
this.LastSubmittedTime = long.Parse(TimeStamp);
}
else
{
this.LastSubmittedTime = 0;
}
}