1-- Library for working with time. Type `Time` represents some number of milliseconds.
6-- Type alias to make it clearer when you are working with time values.
7-- Using the `Time` constants instead of raw numbers is very highly recommended.
10-- Units of time, making it easier to specify things like a
11-- half-second `(500 * milliseconds)` without remembering Elm’s
12-- underlying units of time.
17second = 1000 * millisecond
25inMilliseconds : Time -> Float
28inSeconds : Time -> Float
29inSeconds t = t / second
31inMinutes : Time -> Float
32inMinutes t = t / minute
34inHours : Time -> Float
37-- Takes desired number of frames per second (fps). The resulting signal
38-- gives a sequence of time deltas as quickly as possible until it reaches
39-- the desired FPS. A time delta is the time between the last frame and the
41fps : Number a -> Signal Time
43-- Same as the fps function, but you can turn it on and off. Allows you
44-- to do brief animations based on user input without major inefficiencies.
45-- The first time delta after a pause is always zero, no matter how long
46-- the pause was. This way summing the deltas will actually give the amount
47-- of time that the output signal has been running.
48fpsWhen : Number a -> Signal Bool -> Signal Time
50-- Takes a time interval t. The resulting signal is the current time,
52every : Time -> Signal Time
54-- Takes a time `t` and any signal. The resulting boolean signal
55-- is true for time `t` after every event on the input signal.
56-- So ``(second `since` Mouse.clicks)`` would result in a signal
57-- that is true for one second after each mouse click and false
59since : Time -> Signal a -> Signal Bool
61-- Add a timestamp to any signal. Timestamps increase monotonically. Each
62-- timestamp is related to a specfic event, so `Mouse.x` and `Mouse.y` will
63-- always have the same timestamp because they both rely on the same
65timestamp : Signal a -> Signal (Time, a)
67-- Delay a signal by a certain amount of time. So `(delay second Mouse.clicks)`
68-- will update one second later than any mouse click.
69delay : Time -> Signal a -> Signal a
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list