Yes that is exactly what your code does. I did wonder if that was what you wanted to do.
I was also thinking if this is necessary
if Days => Set_Day and Hours => Set_Hour and _
Minutes => Set_Min and Seconds => Set_Sec and _
100th => Set_100th then OT_Enable = 1
and what would be the implications of just having this
OT_Days = Days - Set_Day
OT_Hours = Hours - Set_Hour
OT_Minutes = Minutes - Set_Min
OT_Seconds =Seconds - Set_sec
OT_100th = 100TH - Set_100th
if Hours - Set_Hour <0 then
OT_Days = Days - 1
OT_Hours = 23 - Set_Day + Hours
endif
if Minutes - Set_Min <0 then
OT_Hours = OT_Hours - 1
OT_Minutes = 59 - Set_Min + Minutes
endif
if Seconds - Set_Sec <0 then
OT_Minutes = OT_Minutes - 1
OT_Seconds = 59 - Set_Sec + Seconds
endif
if 100TH - Set_100th <0 then
OT_Seconds = OT_Seconds - 1
Ot_100TH = 99 - Set_100th + 100TH
endif
Just a thought![]()
Bookmarks