From e5425036e09dd5e1c929d55f245b384702639498 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 17 Mar 2014 14:14:29 -0400 Subject: [PATCH] Put the Label that changed each second in the main test. --- README.md | 2 +- test/main.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8425868..cffc1b0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The issue: - this fools Go's deadlock detector; it never reports anything - changing from standard mutexes to R/W mutexes does not work - making resizes concurrent causes resizes to become too slow to be acceptable (they trail behind the actual user resizing by a significant amount) -If you know a better way I can do things, **please** help... I'm at my wits end here
`test/test -area` will run the Area test with the ticking label; I should probably add one to the main test so it can be tested on all platforms... +If you know a better way I can do things, **please** help... I'm at my wits end here
The main test (`test/test`) now has its label show the current time; GTK+ users can run `test/test -area` for the Area test that sparked this whole calamity. diff --git a/test/main.go b/test/main.go index 6023991..f99ace1 100644 --- a/test/main.go +++ b/test/main.go @@ -243,9 +243,13 @@ func myMain() { } } + ticker := time.Tick(time.Second) + mainloop: for { select { + case curtime := <-ticker: + l.SetText(curtime.String()) case <-w.Closing: break mainloop case <-b.Clicked: