Skip to content

Commit

Permalink
make sure the global timer is up-to-date
Browse files Browse the repository at this point in the history
review feedback
  • Loading branch information
ggreif committed Jan 17, 2025
1 parent 63cdfec commit 321786a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/prelude/internals.mo
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,10 @@ func @timer_helper() : async () {
var failed : Nat64 = 0;
func reinsert(job : () -> async ()) {
if (failed == 0) @timers := @prune @timers;
if (failed == 0) {
@timers := @prune @timers;
ignore (prim "global_timer_set" : Nat64 -> Nat64) 1
};
failed += 1;
@timers := ?(switch @timers {
case (?{ id = 0; pre; post; job = j; expire; delay })
Expand Down

0 comments on commit 321786a

Please sign in to comment.