function scheduleUpdate(count = 0, time = 100, fn) {
    if (lightMode) time *= 5;
    var updateFn = layoutModeGet() ? layoutUpdate : update;
    if (count) { // Force update
        updateFn();
        for (let i = 0; i < count; i++) { setTimeout(updateFn, 10 + 50 * i); }
    }
    if (willBeUpdated) return; // Throttling
    willBeUpdatedSet(true);
    // Call a function before update ..
    if (fn) {
        setTimeout(() => {
            fn();
            updateFn();
        }, time);
    } else setTimeout(updateFn, time);
}
Function to check for any UI update, it is throttled by time
@param {number=} count - this is used to force update
@param {number=} time - the time throttling parameter
@param {function} fn - function to run before updating UI
@category engine