My Projects

 9. Drink Water Reminder

"""
A Gentle drink water reminder...
Made By Hashir Ahmad
--------------------------------
"""
import time
from plyer import notification

# Some Module Specific Variables
time_step: int = 3600
N_title: str = "A Gentle Drink Water Reminder"
N_message: str = "As it's important to stay hidrated,so you should also go and drink a glass of water.It will only take a couple of seconds..."
N_timeout :int = 5


def runDrinWaterReminder():
    def compare() -> bool:
        start_time = time.time()
        end_time = start_time + time_step  # One hour in seconds

        while time.time() < end_time:
            pass

        return True
    print(__doc__)
    while True:
        compare()
        # Notification
        notification.notify(
            title=N_title,
            message=N_message,
            timeout=N_timeout
        )


if __name__ == "__main__":
    runDrinWaterReminder()

Comments

Popular posts from this blog

Advance Calculator Made For Mathematicans and Coders | Made with Python

My Projects

Functions Module