# Labs: simulation clocks and live measurements [Programming guides](README.md) · [Tour the Pliro IDE](pliro-ide.md) **Labs** is a read-only workspace in the desktop IDE, browser playground and embedded wiki examples. Your Pliro program creates simulation clocks and measurement series; Labs shows their live values as clock readouts, charts and an exact-value table. The clock and measurement functions are part of free Learner/Core. ## Try the built-in example 1. Open the bundled **Live measurements** example. 2. Select the **Labs** tab beside Text, Blocks and Media. 3. Choose **Run** in the normal program toolbar. Watch the clock and the chart update. 4. If there is more than one series, use **Measurement series** to choose which one to inspect. Open **Sample values** below the chart for exact times and readings. 5. Choose **Freeze display** to hold the visible snapshot for reading. Choose **Return to live values** to catch up. Freeze display only holds the view; the program keeps running. **Pause**, **Step** and **Stop** in the program toolbar control execution. A toolbar Step advances source execution; `stepSimulation(clock)` is a function in your program that advances simulated time once. ## Make a small measurement ```pliro # language: en let clock = startSimulation(simulationClock(0.5)) let readings = measurementSeries("Distance", "m") for value in [0, none, 4]: set clock = advanceSimulation(clock) set readings = recordMeasurement(readings, clock.time, value) ``` Run this in the desktop IDE or browser playground with Labs open. In an embedded wiki example, choose **Run**, then **Labs** in the compact toolbar. The clock advances by 0.5 simulated seconds each time. The middle reading is `none`, so the chart shows a gap rather than zero; **Sample values** also marks it as missing. Keep the clock and series in program-level variables so Labs can observe them. The helpers return new clock or series values. Use `set` to keep each result. `simulationRate` changes playback pacing metadata, not simulated timestamps; a program must explicitly wait or advance its clock. `resetSimulation` resets the clock but does not erase a series. Use `clearMeasurements` if you also want to clear readings. ## Calls you can use | Purpose | English calls | Dutch aliases | |---|---|---| | Clock | `simulationClock`, `startSimulation`, `pauseSimulation`, `advanceSimulation`, `stepSimulation`, `resetSimulation`, `simulationRate` | `simulatieKlok`, `startSimulatie`, `pauzeerSimulatie`, `vervolgSimulatie`, `stapSimulatie`, `herstelSimulatie`, `simulatieTempo` | | Measurements | `measurementSeries`, `recordMeasurement`, `measurementValues`, `clearMeasurements` | `meetReeks`, `voegMetingToe`, `meetWaarden`, `wisMetingen` | | Number lists | `sum`, `average`, `minimum`, `maximum` | `som`, `gemiddelde`, `minimum`, `maximum` | | Individual numbers | `absolute`, `round` | `absoluut`, `rondAf` | Each call has a page in the [built-in reference](../builtins/README.md). A measurement series retains at most 2,048 samples; older ones count as dropped. `measurementValues` returns present numeric readings only, so statistics exclude missing values. Labs displays up to 16 program-level Lab variables at once and reports any others it cannot show. This display bound does not limit what your program can calculate. The desktop IDE, browser playground and embedded wiki examples show Labs clocks and charts. The same functions can also run in supported native programs. Labs does not silently save live readings in your `.pliro` or `.bipli` project; use explicit saved-data calls when you need persistence. [Running and stopping](execution.md) · [Editions](editions.md) · [The playground](playground.md)