package sihl
The modular functional web framework
Install
Dune Dependency
Authors
Maintainers
Sources
sihl-0.1.3.tbz
sha256=3d1acdd1eae24a7131033656f90b5d20c1621e6ef92957edf88a09b8b5f2d9e9
sha512=d224f54e20a9465c7a03d534dadcb2b9a181ae87c13731840db945aab37534f6f3982c5cb25a197e90c17d8772da062b19fa92bb93ed53a8b736c3776a7776db
doc/src/sihl.schedule/schedule_core.ml.html
Source file schedule_core.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
type scheduled_time = Every of Utils.Time.duration [@@deriving eq, show] type t = { label : string; scheduled_time : scheduled_time; fn : unit -> unit Lwt.t; } [@@deriving fields] type stop_schedule = unit -> unit let get_function schedule = schedule.fn let run_in schedule ~now:_ = let scheduled_time = schedule.scheduled_time in match scheduled_time with | Every duration -> duration |> Utils.Time.duration_to_span |> Ptime.Span.to_float_s let scheduled_function schedule = schedule.fn let create scheduled_time ~f ~label = { label; scheduled_time; fn = f } let every_second = Every Utils.Time.OneSecond let every_hour = Every Utils.Time.OneHour
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>