rem: TimeIn = SleepTask (TimeIn + SleepTicks);
add: SleepThreadUntil (TimeIn + SleepTicks); TimeIn = GetTimeCounter ();
context: color_cycle (void *foo){	UWORD	color_beg, color_len, color_indices;	COUNT	Cycles, CycleCount;	DWORD	TimeIn, SleepTicks;	COLORMAPPTR	BegMapPtr, CurMapPtr;	Cycles = CycleCount = TaskControl.tc.NumCycles;	BegMapPtr = TaskControl.CMapPtr;	SleepTicks = TaskControl.Ticks;	color_indices = MAKE_WORD (BegMapPtr[0], BegMapPtr[1]);	color_beg = *BegMapPtr++ * 3;	color_len = (*BegMapPtr++ + 1) * 3 - color_beg;	CurMapPtr = BegMapPtr;	TaskControl.CMapPtr = 0;	TimeIn = GetTimeCounter ();	for (;;)	{		//_threedo_set_colors (CurMapPtr, color_indices);		if (--Cycles)			CurMapPtr += color_len + sizeof (BYTE) * 2;		else		{			Cycles = CycleCount;			CurMapPtr = BegMapPtr;		}		TimeIn = SleepTask (TimeIn + SleepTicks);		if (TaskControl.CMapPtr)		{			TaskControl.CMapPtr = (COLORMAPPTR)0;			for (;;)				TaskSwitch ();		}	}}