{
  "definitions": [
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "class_declaration",
      "line": 4,
      "name": "SurfaceTimer",
      "signature": "export class SurfaceTimer {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 5,
      "name": "segments",
      "signature": "private readonly segments: readonly Segment[];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 6,
      "name": "index",
      "signature": "private index = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 7,
      "name": "elapsed",
      "signature": "private elapsed = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 8,
      "name": "begun",
      "signature": "private begun = false;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 9,
      "name": "last",
      "signature": "private last: number | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 10,
      "name": "handle",
      "signature": "private handle: number | null = null;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 12,
      "name": "constructor",
      "signature": "public constructor(segments: readonly Segment[]) {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 16,
      "name": "run",
      "signature": "public run(): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 24,
      "name": "halt",
      "signature": "public halt(): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 31,
      "name": "settle",
      "signature": "public settle(count: number): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 41,
      "name": "request",
      "signature": "private request(): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 47,
      "name": "tick",
      "signature": "private tick(now: number): void {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 48,
      "name": "step",
      "signature": "const step = this.last === null ? 0 : Math.min(now - this.last, STEP_LIMIT_MS);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 54,
      "name": "current",
      "signature": "private current(): Segment | undefined {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 58,
      "name": "advanceBy",
      "signature": "private advanceBy(step: number): void {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 64,
      "name": "segment",
      "signature": "let segment = this.current();"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/tree#file-presentation-timers-surface-timer-ts",
  "language": "typescript",
  "layer": "runtime",
  "name": "surface.timer.ts",
  "path": "presentation/timers/surface.timer.ts",
  "ref": "anatomy:file-presentation-timers-surface-timer-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-presentation-timers",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-presentation-timers",
          "label": "presentation/timers",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-presentation-timers.md",
          "ref": "chapter:/anatomy/tree#folder-presentation-timers"
        }
      ],
      "relation": "contained-in"
    }
  ],
  "slots": {
    "concern": "timer",
    "subject": "surface",
    "variant": null
  },
  "stats": {
    "bytes": 2113,
    "callable": 8,
    "definitions": 17,
    "edges": 0,
    "exported": 17,
    "files": 1,
    "findings": {},
    "flows": {
      "isolated": 17
    },
    "lines": {
      "blank": 9,
      "code": 65,
      "total": 74
    }
  },
  "summary": "65 lines of code and 17 definitions.",
  "text": "https://banes-lab.com/source/tree/presentation/timers/surface.timer.ts.txt",
  "tree": "tree",
  "siblings": {
    "next": null,
    "previous": null
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/tree/presentation/timers",
    "label": "presentation/timers",
    "markdown": "https://banes-lab.com/api/source/tree/presentation/timers.md",
    "ref": "api:source/tree/presentation/timers"
  }
}
