Trying to make a c++ scheduler.