Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/System-time/Wren/system-time.wren
Normal file
10
Task/System-time/Wren/system-time.wren
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "os" for Process
|
||||
import "/date" for Date
|
||||
|
||||
var args = Process.arguments
|
||||
if (args.count != 1) Fiber.abort("Please pass the current time in hh:mm:ss format.")
|
||||
var startTime = Date.parse(args[0], Date.isoTime)
|
||||
for (i in 0..1e8) {} // do something which takes a bit of time
|
||||
var now = startTime.addMillisecs((System.clock * 1000).round)
|
||||
Date.default = Date.isoTime + "|.|ttt"
|
||||
System.print("Time now is %(now)")
|
||||
Loading…
Add table
Add a link
Reference in a new issue