poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] `time' builtin


From: Jose E. Marchesi
Subject: [RFC] `time' builtin
Date: Sun, 08 Nov 2020 21:12:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi people!

So we need a `time' builtin function to get the time :)

The main motivation is to build seeds for the already existing `rand':

  fun rand = (uint<32> seed = 0) int<32>:

Now the question is: what would be a good prototype for `time'?  What
should it return?  We could:

a) Make it return seconds since the Epoch, or
b) something more elaborated and precise like a struct tm.

Note that we already have a `ptime' function in the standard library
that gives a date in seconds since the Epoch prints a human-readable
version of it:

  fun ptime = (uint<64> seconds) void:

So maybe a) is more than enough... thoughts?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]