1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:19:56 +00:00
openmw-tes3mp/components/resource/resourcemanager.cpp
2016-03-02 21:58:11 +01:00

36 lines
739 B
C++

#include "resourcemanager.hpp"
#include "objectcache.hpp"
namespace Resource
{
ResourceManager::ResourceManager(const VFS::Manager *vfs)
: mVFS(vfs)
, mCache(new Resource::ObjectCache)
, mExpiryDelay(0.0)
{
}
ResourceManager::~ResourceManager()
{
}
void ResourceManager::updateCache(double referenceTime)
{
mCache->updateTimeStampOfObjectsInCacheWithExternalReferences(referenceTime);
mCache->removeExpiredObjectsInCache(referenceTime - mExpiryDelay);
}
void ResourceManager::setExpiryDelay(double expiryDelay)
{
mExpiryDelay = expiryDelay;
}
const VFS::Manager* ResourceManager::getVFS() const
{
return mVFS;
}
}