这东西头一回用,在luatos上,用起来非常简单,开始没有经验,导致困扰了大半天
重点:**用的时候,每次都需要初始化,**然后以前保存的数据就可以正常读取了
            
            
              Lua
              
              
            
          
          --kv数据库测试
local function fkvtestTask()
    sys.wait(5000)
    if not fskv then
        while true do
            log.info("fskv", "this demo need fskv")
            sys.wait(1000)
        end
    end
    fskv.init()
    log.info("fskv", "init complete")
    -- local ctime= os.time()
    -- fskv.set("time",ctime)
    -- print("写入完成,ctime=",ctime)
    local ctime=fskv.get("time")
    print("读取完成,ctime=",ctime)
    local used, total,kv_count = fskv.status()
    log.info("fdb", "kv", used,total,kv_count)
end