Timing between schedulings, also fix exithandler and make logger use it.

Signed-off-by: Robert Xu <robxu9@gmail.com>