From aa1450bda6666dc22412e937deccffebaf82733c Mon Sep 17 00:00:00 2001 From: Lucas Rosa Date: Tue, 3 Nov 2020 05:20:11 -0500 Subject: gleam/os add timestamp function (#117) --- src/gleam/os.gleam | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/gleam/os.gleam b/src/gleam/os.gleam index 0c3f38a..0623dd5 100644 --- a/src/gleam/os.gleam +++ b/src/gleam/os.gleam @@ -58,3 +58,9 @@ pub type TimeUnit { /// https://erlang.org/doc/apps/erts/time_correction.html#OS_System_Time pub external fn system_time(TimeUnit) -> Int = "os" "system_time" + +/// Return the current OS system time as a tuple of Ints +/// +/// http://erlang.org/doc/man/os.html#timestamp-0 +pub external fn erlang_timestamp() -> tuple(Int, Int, Int) = + "os" "timestamp" -- cgit v1.2.3