Time management based on stack