Imam Al-Ghazali (may God's mercy be on him) wrote in his book The Beginning of Guidance:
You should not neglect your time or use it haphazardly; on the contrary you should bring yourself to account, structure your litanies and other practices during each day and night, and assign to each period a fixed and specific function. This is how to bring out the spiritual blessing (baraka) in each period. But if you leave yourself adrift, aimlessly wandering as cattle do, not knowing how to occupy yourself at every moment, your time will be lost. It is nothing other than your life, and your life is the capital that you make use of to reach perpetual felicity in the proximity of God the Exalted. Each of your breaths is a priceless jewel, since each of them is irreplaceable and, one gone, can never be retrieved. Do not be like the deceived fools who are joyous because each day their wealth increases while their life shortens. What good is an increase in wealth when life grows ever shorter? Therefore be joyous only for an increase in knowledge or in good works, for they are your two companions who will accompany you in your grave when your family, wealth, children, and friends stay behind.