TInt64 CRURefreshTaskExecutor::CalculateTimeStamp()
{
	CRUTblList &tblList = GetRootMV().GetTablesUsedByMe();
	DSListPosition pos = tblList.GetHeadPosition();

	CRUTbl *pTbl = tblList.GetNext(pos);
	TInt64 minTS = pTbl->GetTimestamp();

	while (NULL != pos)
	{
		pTbl = tblList.GetNext(pos);
		TInt64 nextTS = pTbl->GetTimestamp();

		minTS = (nextTS < minTS) ? nextTS : minTS;
	}

	if (0 == minTS)
	{
		// If the timestamp has not been executed until now,
		// this is time to compute it.
		// RUASSERT(CDDObject::eRECOMPUTE == GetRootMV().GetRefreshType());
		minTS = CRUGlobals::GetCurrentTimestamp();
	}

	return minTS;
}