rem: SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
add: SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));
context: SaveProblem (void){	BOOLEAN manage;	STAMP s;	INPUT_STATE InputState;	CONTEXT OldContext;		SetSemaphore (&GraphicsSem);	OldContext = SetContext (SpaceContext);		SaveProblemMessage (&s);	GLOBAL (CurrentActivity) |= CHECK_ABORT;	while (AnyButtonPress (FALSE));	do	{		InputState = GetInputState (NormalInput);		if (InputState & DEVICE_BUTTON1)			manage = TRUE;		else if (InputState & DEVICE_BUTTON3)			manage = FALSE;		else			InputState = 0;	} while (!InputState);	GLOBAL (CurrentActivity) &= ~CHECK_ABORT;	BatchGraphics ();	DrawStamp (&s);	UnbatchGraphics ();	SetContext (OldContext);	DestroyDrawable (ReleaseDrawable (s.frame));		ClearSemaphore (&GraphicsSem);		if (manage)	{		BYTE clut_buf[1];		SetSemaphore (&GraphicsSem);		SetFlashRect (NULL_PTR, (FRAME)0);		 ClearSemaphore (&GraphicsSem);   		clut_buf[0] = FadeAllToBlack;		SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));		FlushColorXForms ();#if 0		SuspendTasking (); // just in case		ManageNVRAM ();		ResumeTasking ();#endif		clut_buf[0] = FadeAllToColor;		SleepTask (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2));		FlushColorXForms ();	}	else	{#if 0		CleanNVRAM ();#endif		SleepTask (GetTimeCounter () + (ONE_SECOND / 4));	}	return (manage);}