| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | FSM |
-=> Quoting MIKE ROSS to Leonard Erickson <=- MR> "Leonard Erickson" wrote to "Jasen Betts" (12 Jun 03 02:37:08) MR> --- on the topic of "FSM" LE> I wound up writing a generic "delay" routine that you fed the delay LE> time and it checked to see if the end of the period was past midnight LE> and if so adjusted things accordingly. Ugly, but necessary. MR> One solution is to simply check if the TIMER seconds changed and just MR> increment a counter. It's a little choppy if one needs fine resolution MR> but it sidesteps the midnight problem. Otherwise one might use the MR> number of seconds in a day idea i.e. 86400 seconds / 24 hours: I used the timer tick counter in segment 0040. Add the required number of ticks to it to get the end time and if it was past the maximum (midnight) value, subtract that value and set a flag so that the code knows to ignore values much greater than the target. Then just compare the stop count to the target count every time through the loop. --- FMailX 1.60* Origin: Shadowgard (1:105/50) SEEN-BY: 633/267 270 @PATH: 105/50 360 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.