Skip to content

function setDayLength

Note

Day length can't be smaller than 10 000 miliseconds.

This function will set the day length in miliseconds.
Original: setDayLength

Declaration

async def setDayLength(miliseconds : float)

Parameters

float miliseconds: day length in miliseconds.

Source code in src/pyg2o/functions/game.py
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
async def setDayLength(miliseconds : float):
    """
    !!! note
        Day length can't be smaller than 10 000 miliseconds.

    This function will set the day length in miliseconds.
    Original: [setDayLength](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setDayLength/)

    ## Declaration
    ```python
    async def setDayLength(miliseconds : float)
    ```
    ## Parameters
    `float` **miliseconds**: day length in miliseconds.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return result