Both, but I have had better luck listening to music on a timer while I am sleeping.