Packages

Fledex_Scheduler is a fork of SchedEx, a simple yet deceptively powerful scheduling library for Elixir, adjusted for the use with Fledex

Current section

Files

Jump to
fledex_scheduler lib fledex_scheduler identity_time_scale.ex
Raw

lib/fledex_scheduler/identity_time_scale.ex

# Copyright 2025-2026, Matthias Reik <fledex@reik.org>
# Modified version of : https://github.com/SchedEx/SchedEx
#
# SPDX-License-Identifier: MIT
defmodule Fledex.Scheduler.IdentityTimeScale do
@moduledoc """
The default module used to set the `time_scale`. Can be thought of as "normal time" where "now" is now and speedup is 1 (no speedup).
"""
@behaviour Fledex.Scheduler.TimeScale
alias Fledex.Scheduler.TimeScale
@impl TimeScale
def now(timezone) do
DateTime.now(timezone) |> elem(1)
end
@impl TimeScale
def speedup do
1
end
end