import {sleep} from '../inner-comps/test-util-run-test'

export async function demoChange(
    target: {
        changing?: number
        time?: number
    },
    interval = 500
) {
    target.changing = !target.changing
        ? 1
        : target.changing + 1;

    await sleep(interval);

    target.time = target.time
        ? target.time + interval
        : interval;
    target.changing -= 1;
}
