Bugfix in scheduler

Fixed bug where scheduler's millitimer might overflow if no tasks are scheduled for over 5.5 seconds