Hi,
I have some basic knowledge in programming however it is not enough to solve the problem I faced currently. So I would like to ask for the pros for guild and help.
I have attached the print screen of my program's GUI
1)From the GUI, the combobox next to Lamp 1 provide user with 3 options: On, Off, Set
If user choose "Set", user can configure the time interval
e.g. from 8:00 AM to 9.00AM
Else user unable to configure the time interval.
2) When user configured the time interval(e.g. 8:00AM to 9.00AM) and clicked "OK", I need to constantly check the time of my computer and compare with the time interval.
If my computer time >= 8:00AM && my computer time <= 9.00AM
status will be set to "ON"
else
status will be set to "OFF"
Problems:
1) How to constantly (each second)compare the time interval with my computer's current time
Hope to get some advice soon. Thanks :)