sync and delivery (and unused read) states and other smaller refactors

This commit is contained in:
2024-01-12 16:45:52 +01:00
parent 7c576dd4d0
commit 20b4cdc5f1
9 changed files with 147 additions and 25 deletions

View File

@@ -71,8 +71,10 @@ struct TextureEntry {
TextureEntry generateTestAnim(TextureUploaderI& tu);
// TODO: move to utils or something
uint64_t getNowMS(void);
// fwd
namespace Message {
uint64_t getTimeMS(void);
}
template<typename TextureType, typename KeyType, class Loader>
struct TextureCache {
@@ -132,7 +134,7 @@ struct TextureCache {
}
void update(void) {
const uint64_t ts_now = getNowMS();
const uint64_t ts_now = Message::getTimeMS();
std::vector<KeyType> to_purge;
for (auto&& [key, te] : _cache) {