Depth-based time management

Idea by hfwittmann and joachimrang.