-
-
Save anonymous/7456a565ff7fbe5bd754 to your computer and use it in GitHub Desktop.
ffi blocking function call test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it 'can wrap a blocking function' do | |
fp = FFI::Function.new(:void, [ :int ], @libtest.find_function('testBlocking'), :blocking => true) | |
time = Time.now.to_i | |
fp.call(2) | |
expect(Time.now.to_i - time).to be > 2 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment