RosettaCodeData/Task/Time-a-function/Elena/time-a-function.elena

24 lines
383 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
import system'calendar;
import system'routines;
import system'threading;
import system'math;
import extensions;
2026-02-01 16:33:20 -08:00
SomeProcess()
2023-07-01 11:58:00 -04:00
{
2026-02-01 16:33:20 -08:00
Thread.sleep(1000);
2023-07-01 11:58:00 -04:00
2024-03-06 22:25:12 -08:00
new Range(0,10000).filterBy::(x => x.mod(2) == 0).summarize();
2023-07-01 11:58:00 -04:00
}
2026-02-01 16:33:20 -08:00
public Program()
2023-07-01 11:58:00 -04:00
{
var start := now;
2026-02-01 16:33:20 -08:00
SomeProcess();
2023-07-01 11:58:00 -04:00
var end := now;
2026-02-01 16:33:20 -08:00
Console.printLine("Time elapsed in msec:",(end - start).Milliseconds)
2023-07-01 11:58:00 -04:00
}