POST /time
Since 0.6
Request
Request body: TimeRequest
POST /time request. Every field is optional; absent means "leave it alone".
| Field | Type | Required | Description |
|---|---|---|---|
scale | number | no | New time scale, in [0.1, 10.0]. |
paused | boolean | no | Pause or resume. |
step | integer | no | Advance exactly this many fixed ticks, whether or not the sim is paused. |
Response
Response: TimeResponse
POST /time response: the state after the request was applied.
| Field | Type | Present | Description |
|---|---|---|---|
scale | number | always | Time scale now in effect. |
paused | boolean | always | Whether the sim is paused. |
frame | integer | always | The frame counter after any requested step ran. |
fixed_dt | number | always | Fixed timestep in seconds; 1/60 in this engine. |
stepped | integer | always | How many ticks the requested step actually ran. |
Example
curl -X POST "http://127.0.0.1:7700/time" --json @body.json
Start a server with argus run --serve; the port is --port (7700 by default). The request and response fields are in the query API guide.