You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added support for ESP32 development builds to include NVS partition data at build time
81
+
- Added `nanosecond` and `native` time unit support to `erlang:system_time/1`, `erlang:monotonic_time/1`, and `calendar:system_time_to_universal_time/2`
Copy file name to clipboardExpand all lines: doc/src/programmers-guide.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -679,20 +679,22 @@ Use [`erlang:timestamp/0`](./apidocs/erlang/estdlib/erlang.md#timestamp0) to get
679
679
{MegaSecs, Secs, MicroSecs} =erlang:timestamp().
680
680
```
681
681
682
-
Use [`erlang:system_time/1`](./apidocs/erlang/estdlib/erlang.md#system_time1) to obtain the seconds, millisecondsor microseconds since the UNIX epoch (Midnight, Jan 1, 1970, UTC):
682
+
Use [`erlang:system_time/1`](./apidocs/erlang/estdlib/erlang.md#system_time1) to obtain the seconds, milliseconds, microseconds or nanoseconds since the UNIX epoch (Midnight, Jan 1, 1970, UTC):
683
683
684
684
```erlang
685
685
Seconds = erlang:system_time(second).
686
686
MilliSeconds = erlang:system_time(millisecond).
687
687
MicroSeconds = erlang:system_time(microsecond).
688
+
NanoSeconds = erlang:system_time(nanosecond).
688
689
```
689
690
690
-
Use [`erlang:monotonic_time/1`](./apidocs/erlang/estdlib/erlang.md#monotonic_time1) to obtain a (possibly not strictly) monotonically increasing time measurement. Use the same time units to convert to seconds, milliseconds, or microseconds:
691
+
Use [`erlang:monotonic_time/1`](./apidocs/erlang/estdlib/erlang.md#monotonic_time1) to obtain a (possibly not strictly) monotonically increasing time measurement. Use the same time units to convert to seconds, milliseconds, microseconds or nanoseconds:
Toconvertatime (inseconds, milliseconds, ormicrosecondsfromtheUNIXepoch) toadate-time, usethe [`calendar:system_time_to_universal_time/2`](./apidocs/erlang/estdlib/calendar.md#system_time_to_universal_time2) function. For example,
727
+
Toconvertatime (inseconds, milliseconds, microseconds, ornanosecondsfromtheUNIXepoch) toadate-time, usethe [`calendar:system_time_to_universal_time/2`](./apidocs/erlang/estdlib/calendar.md#system_time_to_universal_time2) function. For example,
726
728
727
729
```erlang
728
730
Milliseconds = ... %% get milliseconds from the UNIX epoch
@@ -731,7 +733,7 @@ Milliseconds = ... %% get milliseconds from the UNIX epoch
0 commit comments