This commit is contained in:
joonicks
2018-03-16 02:45:13 +01:00
parent fb70029b56
commit 6c906e43ee
26 changed files with 575 additions and 201 deletions

View File

@@ -864,7 +864,44 @@ typedef struct
} HookTimer;
//using that struct, calculate when the next time will be
//start by determining what the time is now
thistime = now;
//which second is it
thissecond = thistime % 60;
if (ht->second1 == 0x3FFFFFFF && ht->second2 == 0x3FFFFFFF)
{
// dont add waiting period to get to the proper second
}
//which minute is it
thistime = (thistime - thissecond) / 60;
thisminute = thistime % 60;
if (ht->minute1 == 0x3FFFFFFF && ht->minute2 == 0x3FFFFFFF)
{
// dont add waiting period to get to the proper minute
}
//which hour is it
thistime = (thistime - thisminute) / 60;
thishour = thistime % 24;
if (ht->hour == 0xFFFFFF)
{
// dont add waiting period to get to the proper hour
}
//which weekday is it
thistime = (thistime - thishour) / 60; //thistime is now = day since epoch
if (ht->weekday == 0x7F) // every day
{
// dont add waiting period to get to the correct day
}
#endif /* 0 */
/*
* return -1 on failure
*/