mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-15 19:28:47 +00:00
Cyclic equal (alpha)
This commit is contained in:
parent
c73f43e817
commit
c29ab4901f
13 changed files with 402 additions and 18 deletions
14
stdlib/Timer.lama
Normal file
14
stdlib/Timer.lama
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Timer.
|
||||
-- (C) Dmitry Boulytchev, JetBrains Research, St. Petersburg State University, 2020
|
||||
--
|
||||
-- This unit provides an implementation for simple timer. A timer is a function which
|
||||
-- measures an elapsed time (in microseconds) since its creation.
|
||||
|
||||
-- Creates a new timer
|
||||
public fun timer () {
|
||||
local t = time ();
|
||||
|
||||
fun () {
|
||||
time () - t
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue