using CxxWrap
using CxxWrap.CxxWrapCore: SafeCFunction
using BenchmarkTools

if !isdefined(Main, :M)
    include("ibapi-mod.jl")
end
using .M

function main2()
    # jc = M.MyClient(
    #     @safe_cfunction(fuckCb, Nothing, (Int32,)) 
    # )
    # c = M.TestCppClient(jc)
    
    # c = M.TestCppClient(
    #     @safe_cfunction(fuckCb, Nothing, (Int32,))
    # )
    #
    # for i=1:3
    #     M.getFuck(c)
    #     println(fuckVal)
    # end

    # @btime M.getFuck($c)
end

function main()
    c = M.Client()
    M.getFuck(c)
end
