using simgear::TileCache;
TileCache::TileCache( void ) :
- max_cache_size(100)
+ max_cache_size(100), current_time(0.0)
{
tile_cache.clear();
}
// register tile in the cache
long tile_index = e->get_tile_bucket().gen_index();
tile_cache[tile_index] = e;
+ e->set_timestamp(current_time);
return true;
}
// Free a tile cache entry
void entry_free( long cache_index );
+ double current_time;
+
public:
tile_map_iterator begin() { return tile_cache.begin(); }
tile_map_iterator end() { return tile_cache.end(); }
* @return success/failure
*/
bool insert_tile( simgear::TileEntry* e );
+
+ void set_current_time(double val) { current_time = val; }
+ double get_current_time() const { return current_time; }
};
}