Created
March 6, 2016 12:03
-
-
Save jonathanstowe/23a9bb99630fef8c8588 to your computer and use it in GitHub Desktop.
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
use NativeCall; | |
class Timeval is repr('CStruct') { | |
has int64 $.seconds; | |
has int64 $.microseconds; | |
} | |
sub select(int64, Pointer, Pointer, Pointer, Timeval) is native { * } | |
my $tv = Timeval.new(seconds => 10, microseconds => 0); | |
Supply.interval(1).tap({ say $_}); | |
select(1,Pointer, Pointer, Pointer, $tv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment