Added helper to get delta time to the node tree.

This commit is contained in:
Relintai 2022-02-10 17:01:57 +01:00
parent e705cbca34
commit a3119b8b09
4 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,10 @@ void NodeTree::_send_update() {
}
}
float NodeTree::get_update_delta_time() {
return 0;
}
NodeTree::NodeTree() :
Object() {

View File

@ -17,6 +17,8 @@ public:
void request_write_lock();
virtual float get_update_delta_time();
NodeTree();
~NodeTree();

View File

@ -25,6 +25,9 @@ void WebServer::handle_request(Request *request) {
_rw_lock.read_unlock();
}
float WebServer::get_update_delta_time() {
return _update_interval;
}
WebServer::WebServer() : NodeTree() {
_web_root = nullptr;

View File

@ -16,6 +16,8 @@ public:
void handle_request(Request *request);
float get_update_delta_time();
WebServer();
virtual ~WebServer();