Age | Commit message (Collapse) | Author |
|
|
|
|
|
* rickard/timer-optimization/OTP-12650:
Optimized timer implementation
Reusable red-black tree implementation
Conflicts:
erts/emulator/beam/erl_bif_timer.c
|
|
* rickard/time-improvement/OTP-11997:
Allow execution of estone suite on pre OTP-18 systems
Add parallel time monotonicity test-case
Replace usage of erlang:now() in line-tracing
Replace erlang:now() usage in emulator suite
Replace erlang:now() usage in system suite
Misc time improvements
|
|
|
|
- Possibility to chose different clock sources
- Improved mach clock usage
- Improved linux clock_gettime() usage
- ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The old time API is based on erlang:now/0. The major issue with
erlang:now/0 is that it was intended to be used for so many
unrelated things. This tied these unrelated operations together
and unnecessarily caused performance, scalability as well as
accuracy, and precision issues for operations that do not need
to have such issues. The new API spreads different functionality
over multiple functions in order to improve on this.
The new API consists of a number of new BIFs:
- erlang:convert_time_unit/3
- erlang:monotonic_time/0
- erlang:monotonic_time/1
- erlang:system_time/0
- erlang:system_time/1
- erlang:time_offset/0
- erlang:time_offset/1
- erlang:timestamp/0
- erlang:unique_integer/0
- erlang:unique_integer/1
- os:system_time/0
- os:system_time/1
and a number of extensions of existing BIFs:
- erlang:monitor(time_offset, clock_service)
- erlang:system_flag(time_offset, finalize)
- erlang:system_info(os_monotonic_time_source)
- erlang:system_info(time_offset)
- erlang:system_info(time_warp_mode)
- erlang:system_info(time_correction)
- erlang:system_info(start_time)
See the "Time and Time Correction in Erlang" chapter of the
ERTS User's Guide for more information.
|
|
Conflicts:
lib/diameter/autoconf/vxworks/sed.general
xcomp/README.md
|
|
|
|
|
|
* ta/docsmaint:
Fix various doc typos for R15B02
Fix various code typos for R15B02
OTP-10245
|
|
|
|
|
|
Conflicts:
erts/doc/src/erlang.xml
erts/preloaded/ebin/init.beam
lib/kernel/doc/src/os.xml
lib/stdlib/test/filename_SUITE.erl
|
|
erlang:universaltime_to_localtime is leap seconds-aware (since 2008),
however erlang:localtime_to_universaltime is not, which gives
surprising results on systems configured with leap seconds-aware
timezones:
1> erlang:universaltime_to_localtime({{2012,1,1},{0,0,0}}).
{{2012,1,1},{0,0,0}}
2> erlang:localtime_to_universaltime({{2012,1,1},{0,0,0}}).
{{2012,1,1},{0,0,24}}
and completely breaks calendar:local_time_to_universal_time_dst:
3> calendar:local_time_to_universal_time_dst({{2011,1,1},{0,0,0}}).
[]
Signed-off-by: Piotr Sikora <[email protected]>
|
|
Commit 1eef765 introduced regression (conditional _always_ evaluates
to true) in which erlang:localtime_to_universaltime/2 stopped working
on systems configured with timezone without DST (i.e. UTC) on *BSD
platforms:
1> erlang:localtime_to_universaltime({{2012,1,1},{0,0,0}}, true).
** exception error: bad argument
Signed-off-by: Piotr Sikora <[email protected]>
|
|
|
|
|
|
|
|
* egil/file-info-opt-utc/OTP-7687: (39 commits)
Remove time_t specific test in prim_file_SUITE
Update prim_file.beam and prim_zip.beam
Add types for posixtime_to_universaltime and the reverse
Set BASEYEAR to 1902
Set lower limit of years handled to 1601
Emulate localtime, gmtime and mktime to enable negative time_t
Document file:*_file_info/2
Fix compiler warning in unix_efile.c
Change name of bif universaltime_to_seconds/1
Change options to prim_file:*_file_info/*
Remove dead code
Catch errors from prim_file:*_file_info
Testcase for utc <-> seconds conversion
Fix negative time in seconds_to_universaltime/1
Remove OS taint from datetime conversion
Add utc <-> seconds conversions bifs
Let prim_file validate ctime in file_info
Teach #file_info spec unix epochs for file times
Add file_info_opt tests in prim_file_SUITE
unix_efile: Zero is a valid number in utime
...
Conflicts:
erts/emulator/beam/erl_time_sup.c
erts/emulator/sys/win32/erl_win_sys.h
erts/emulator/sys/win32/sys_time.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Handle error cases when localtime or localtime_r returns null.
|
|
|
|
|
|
|
|
|
|
Can still not setup -a, but cerl works.
|
|
|
|
|
|
This change handles erlang:localtime_to_universaltime(...,true) in timezones
without DST in a consistent way over platforms. Specifically BSD did return
an (accurate) -1 from mktime, which blew things up. Now all platforms regard
no DST as a DST with delta zero. Linux, SunOS, MacOS etc already did this,
why the behaviour on BSD was updated to the slightly incorrect one instead
of breaking backward compatibility on most other platforms.
Before this change, erlang:localtime_to_universaltime({{2008, 8, 1},
{0, 0, 0}},true) would return {1969, 12, 31}, {23, 59, 59}} when
TZ=UTC on FreeBSD, now it mimics the behaviour of other systems and returns
{{2008, 8, 1},{0, 0, 0}}.
The problem was originally reported by Paul Guyot on erlang-bugs mailing list:
http://www.erlang.org/pipermail/erlang-bugs/2008-November/001077.html
This correction replaces earlier BSD specific open source patches for this
problem.
|
|
* ta/os_timestamp_no_mutex:
Remove mutex lock around sys_gettimeofday() in os:timestamp/0
OTP-8390 An unecessary lock operation in os:timestamp/0 has been
eliminated, making it slightly more efficient. (Thanks to Jonas
Falkevik and Tuncer Ayaz.)
|
|
In the erlang-questions thread "os:timestamp() uses mutex lock"
Jonas Falkevik questioned the need for a mutex lock in
os:timestamp/0. The mutex lock *is* needed in erlang:now()
to guarantee the uniqueness of the returned time, but serves
no useful purpose in os:timestamp().
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|