Function to run on each hour
#7

Create a timer to run every minute and check if the minutes are equal to 0. If minutes are equal to 0, that means a new hour began.

Код:
SetTimer("Function1",60000,true);

public Function1()
{
	new hours,minutes,seconds;
	gettime(hours,minutes,seconds);
	if(minutes==0)
	{
	    // New hour began
	}
	return 1;
}
Reply


Messages In This Thread
Function to run on each hour - by Jonesy96 - 06.06.2016, 09:06
Re: Function to run on each hour - by blackeagle1122 - 06.06.2016, 09:36
Re: Function to run on each hour - by Nin9r - 06.06.2016, 09:53
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 10:10
Re: Function to run on each hour - by iggy1 - 06.06.2016, 10:22
Re: Function to run on each hour - by Abagail - 06.06.2016, 10:53
Re: Function to run on each hour - by Unte99 - 06.06.2016, 11:11
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)