Updated so that cps updates every 10ms (should prob be a bit longer wait
time to decrease memory usage).