if not playdate.isSimulator then
    return
end
getCurrentTimeMilliseconds = playdate.getCurrentTimeMilliseconds

tinyTrackEntityAges = false
ENTITY_INIT_MS = { "ENTITY_INIT_MS" }

if tinyTrackEntityAges then
    function tinyGetEntityAgeMs(entity)
        return entity[ENTITY_INIT_MS]
    end
end

tinyLogSystemUpdateTime = true
tinyLogSystemChanges = false

tinyWarnWhenNonDataOnEntities = false

if tinyWarnWhenNonDataOnEntities then
    function checkForNonData(e, nested, tableCache)
        nested = nested or false
        tableCache = tableCache or {}

        local valType = type(e)
        if valType == "table" then
            if tableCache[e] then
                return
            end
            tableCache[e] = true
            for k, v in pairs(e) do
                local keyWarning = checkForNonData(k, true, tableCache)
                if keyWarning then
                    return keyWarning
                end
                local valueWarning = checkForNonData(v, true, tableCache)
                if valueWarning then
                    return valueWarning
                end
            end
        elseif valType == "function" or valType == "thread" or valType == "userdata" then
            return valType
        end
    end
end