writes data out immediately, and runs based on time