-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
068bf92
commit b223aa4
Showing
32 changed files
with
3,418 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,4 @@ bench | |
test/bench | ||
.koka | ||
scratch | ||
.cache |
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "std_time_timer.h" | ||
|
||
|
||
kk_box_t kk_set_timeout(kk_function_t cb, int64_t time, kk_context_t* _ctx) { | ||
kk_std_time_timer__timer t = kk_std_time_timer_timer_init(_ctx); | ||
kk_std_time_timer_timer_start(t, time, 0, cb, _ctx); | ||
return kk_std_time_timer__timer_box(t, _ctx); | ||
} | ||
|
||
|
||
static kk_box_t kk_unit_closure(kk_function_t _fself, kk_context_t* _ctx); | ||
static kk_function_t kk_new_unit_closure(kk_context_t* _ctx) { | ||
kk_define_static_function(_fself, kk_unit_closure, _ctx) | ||
return kk_function_dup(_fself,kk_context()); | ||
} | ||
|
||
static kk_box_t kk_unit_closure(kk_function_t _fself, kk_context_t* _ctx) { | ||
kk_unused(_fself); | ||
return kk_unit_box(kk_Unit); | ||
} | ||
|
||
|
||
kk_unit_t kk_clear_timeout(kk_box_t t, kk_context_t* _ctx) { | ||
kk_std_time_timer__timer timer = kk_std_time_timer__timer_unbox(t, KK_OWNED, _ctx); | ||
kk_std_os_uv_close(kk_std_os_uv__new_UvHandle(timer.internal, _ctx), kk_new_unit_closure(_ctx), _ctx); | ||
return kk_Unit; | ||
} | ||
|
||
|
||
|
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
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
Oops, something went wrong.