Skip to content

Instantly share code, notes, and snippets.

@FCO
Last active August 17, 2023 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FCO/650524bb5011ec4d2848659b523228d2 to your computer and use it in GitHub Desktop.
Save FCO/650524bb5011ec4d2848659b523228d2 to your computer and use it in GitHub Desktop.
my $interval = .run-at: :5mins-running, :off, -> :$rule, :$time {
$rule.stop;
say "$time.hh-mm-ss(): interval has finished"
}
.run-at: :25mins-running, -> :$rule, :$time {
$rule.stop; say "$time.hh-mm-ss(): Time to relax";
$interval.start
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment