-module(touch_grass@now). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/touch_grass/now.gleam"). -export([lift/0, lower/0, decode/1, encode/1, sync/0]). -file("src/touch_grass/now.gleam", 8). -spec lift() -> eyg@analysis@type_@isomorphic:type(any()). lift() -> {record, empty}. -file("src/touch_grass/now.gleam", 12). -spec lower() -> eyg@analysis@type_@isomorphic:type(any()). lower() -> integer. -file("src/touch_grass/now.gleam", 16). -spec decode(eyg@interpreter@value:value(OLK, OLL)) -> {ok, nil} | {error, eyg@interpreter@break:reason(OLK, OLL)}. decode(Input) -> eyg@interpreter@cast:as_unit(Input, nil). -file("src/touch_grass/now.gleam", 20). -spec encode(integer()) -> eyg@interpreter@value:value(any(), any()). encode(Millis) -> {integer, Millis}. -file("src/touch_grass/now.gleam", 24). -spec sync() -> integer(). sync() -> Timestamp = gleam@time@timestamp:system_time(), {S, Ns} = gleam@time@timestamp:to_unix_seconds_and_nanoseconds(Timestamp), (S * 1000) + (Ns div 1000000).