Jav save the date and time at a particular syncpoint and restart from same point
<p>My application looks for daily updates from API. So I wanted to save the date and time at particular point  and then restart(let's say tomorrow) from the same sync point to look for updates.</p>

<p>Something like this structure:</p>

<pre><code>main()
{
long sync = getlastSavedStateTime()

lookForUpdates()

saveStateTimeAgain()
}
</code></pre>