Bundle Date, time, and elapsed-timer utilities. Date provides current date/time and arithmetic (AddDays, AddHours). Timer measures wall-clock elapsed time. Included in lang.obl.
Timer
Provides elapsed time
timer := System.Time.Timer->New();
timer->Start();
# ... work ...
timer->End();
elapsed := timer->GetElapsedTime();
"Elapsed: {$elapsed}s"->PrintLine();Operations
GetElapsedTime #
Number of clock ticks per/second
method : public : GetElapsedTime() ~ FloatExample
secs := timer->GetElapsedTime();
"Time: {$secs} seconds"->PrintLine();New # constructor
Constructor
New(start:Bool)Parameters
| Name | Type | Description |
|---|---|---|
| start | Bool | flag, start timer after instantiation, default = true |
Start #
Starts the timer
method : public : Start() ~ NilExample
timer := System.Time.Timer->New();
timer->Start();