MCPcopy Create free account
hub / github.com/andlabs/ui / counter

Function counter

examples/updateui.go:99–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99func counter() {
100 for {
101 time.Sleep(1 * time.Second)
102 count++
103
104 // Update the UI using the QueueMain function
105 ui.QueueMain(func() {
106 countLabel.SetText(fmt.Sprintf("%d", count))
107 })
108 }
109}
110
111func main() {
112 count = 0

Callers 1

setupUIFunction · 0.85

Calls 1

SetTextMethod · 0.45

Tested by

no test coverage detected