aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLucas Rosa <lrosa008@gmail.com>2020-11-03 05:20:11 -0500
committerGitHub <noreply@github.com>2020-11-03 10:20:11 +0000
commitaa1450bda6666dc22412e937deccffebaf82733c (patch)
treeaced4858ff1a541ec04f422af30911c9b381d6b0 /src
parent33fd0fb3130bf1f11947385c42e8bfadb3c753e1 (diff)
downloadgleam_stdlib-aa1450bda6666dc22412e937deccffebaf82733c.tar.gz
gleam_stdlib-aa1450bda6666dc22412e937deccffebaf82733c.zip
gleam/os add timestamp function (#117)
Diffstat (limited to 'src')
-rw-r--r--src/gleam/os.gleam6
1 files changed, 6 insertions, 0 deletions
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"