Changed time counting to delta