RAGS - v1.10.0
    Preparing search index...

    Function interval

    • Calls a callback immediately and then repeatedly at the given interval.

      Parameters

      • interval: number

        Interval in milliseconds between invocations

      • callback: () => void

        The function to call

      • Optionalbind: Widget

        Optional widget; the interval is removed when the widget is destroyed

      Returns number

      The GLib source ID (can be used with GLib.source_remove)

      const id = interval(1000, () => console.log('tick'));