- Home /
How can I make an alarm clock?
I would like to make an application that will check the time of the computer itself and then ring a bell when a certain time passes. I know this is a lot to ask but if you have some time can you please help me out? All i really need to know is how to get the time from the computer. Then the alarm part is just something else you can add if you have time but it would help a lot. (If you are going to help with the alarm then can you make the time editable?) Thank you.
Answer by HakanOzcan · Jan 19, 2015 at 07:37 PM
DateTime.Now.TimeOfDay gives it to you as a TimeSpan (from midnight).
DateTime.Now.ToString("h:mm:ss tt") gives it to you as a string.
Answer by ZeroParadigm · Jan 19, 2015 at 07:40 PM
You can get the system Date by using the DateTime structure in a C# script by using DateTime.Now
void PrintDate()
{
Debug.Log("Date : " + System.DateTime.Now.ToString());
}
Just remember that you have to have System.Collections included. More information on another thread
Hello @ Zeroparadigm, How our system knows, if i didn't opened the App in the system. i mean i just installed the app but didnt opened the App.
Your answer
Follow this Question
Related Questions
Timing pulses from microphone 0 Answers
Best Audio File Format Practices? iOS/Unity 1 Answer