06.09.2014, 19:33
Quote:
Hello,
I have a litte question about gettime function. Код:
new hour, minute, second; gettime(hour, minute, second); if(hour >= 03) { //some code } |
so, where's your problem?
you have what you want, if hours equals 3 (or greater than 3), it's 3am in the morning.
you can just do your stuff in that control structure.
btw. if you were to put some code generating some message like "hello! it's 3 am!"
with the current condition in that control structure, it would still say that it's3 am in the morning even if it's 9 pm :P
something like
Код:
if(hour == 3)
ah, well, you could also do a nice switch, if you want multiple messages displaying at certain times of the day