Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -0,0 +1,6 @@
$ start_time = f$time()
$ wait 0::10
$ end_time = f$time()
$ write sys$output "start time was ", start_time
$ write sys$output "end time was ", end_time
$ write sys$output "delta time is ", f$delta_time( start_time, end_time )

View file

@ -0,0 +1,8 @@
:os.timestamp # => {MegaSecs, Secs, MicroSecs}
:erlang.time # => {Hour, Minute, Second}
:erlang.date # => {Year, Month, Day}
:erlang.localtime # => {{Year, Month, Day}, {Hour, Minute, Second}}
:erlang.universaltime # => {{Year, Month, Day}, {Hour, Minute, Second}}
:calendar.local_time # => {{Year, Month, Day}, {Hour, Minute, Second}}
:calendar.universal_time # => {{Year, Month, Day}, {Hour, Minute, Second}}

View file

@ -0,0 +1 @@
:random.seed(:erlang.now)

View file

@ -0,0 +1,3 @@
(message "%s" (current-time-string))
=>
"Wed Oct 14 22:21:05 1987"

View file

@ -0,0 +1,4 @@
ts = time()
println("The system time is (in ISO 8601 format):")
println(strftime(" %F %T %Z", ts))

View file

@ -0,0 +1,3 @@
install(time, "lf");
t = time();
print(t); \\ integer seconds since the epoch (usually 1 Jan 1970)

View file

@ -1 +1,2 @@
say DateTime.now;
dd DateTime.now.Instant;

View file

@ -8,3 +8,6 @@ puts t.to_i # => 1388134823
# epoch time with fractional seconds
puts t.to_f # => 1388134823.9801579
# epoch time as a rational (more precision):
puts Time.now.to_r # 1424900671883862959/1000000000

View file

@ -0,0 +1,5 @@
$ Unix time
print(tod);
$ Human readable time and date
print(date);

View file

@ -0,0 +1,2 @@
1447628158908
Sun Nov 15 22:55:58 2015