screeps-api
    Preparing search index...

    Interface ServerTimeEvent

    Event that reports the current system time on the server.

    interface ServerTimeEvent {
        data: { time: number };
        id: undefined;
        path: "time";
        type: "server";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    data: { time: number }

    The event payload. Extensions of this interface should specify a more precise type.

    Type Declaration

    • time: number

      The current system time of the server represented as a UNIX timestamp (in milliseconds).

    id: undefined

    ID of the entity the event is reporting on. Undefined when type is server.

    Examples:

    • User ID for user events
    • Room name (shard0/W0N0, W0N0, etc) for room events
    path: "time"

    When non-empty, indicates that the event concerns a property or aspect of type.

    Examples:

    • /resources for user-type events indicates an update to resource counts
    type: "server"