Can't use the timer here since it syncs the gpu and this runs in a separate thread.