MCPcopy Index your code
hub / github.com/nodejs/node / #render

Method #render

deps/npm/lib/utils/display.js:518–530  ·  view source on GitHub ↗
(resuming)

Source from the content-addressed store, hash-verified

516 }
517
518 #render (resuming) {
519 if (!this.#rendering) {
520 return
521 }
522 // We always attempt to render immediately but we only request to move to the next frame if it has been longer than our spinner frame duration since our last update
523 this.#renderFrame(Date.now() - this.#lastUpdate >= this.#spinner.duration, resuming)
524 if (!this.#interval) {
525 this.#interval = setInterval(() => this.#renderFrame(true), this.#spinner.duration)
526 // Make sure this timeout does not keep the process open
527 this.#interval.unref()
528 }
529 this.#interval.refresh()
530 }
531
532 #renderFrame (next, resuming) {
533 if (next) {

Callers 3

loadMethod · 0.95
resumeMethod · 0.95
writeMethod · 0.95

Calls 5

#renderFrameMethod · 0.95
nowMethod · 0.80
setIntervalFunction · 0.50
unrefMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected